Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and locate XCUITest Suite for device #149

Open
emin-grbo opened this issue Jul 5, 2023 · 2 comments
Open

Build and locate XCUITest Suite for device #149

emin-grbo opened this issue Jul 5, 2023 · 2 comments

Comments

@emin-grbo
Copy link

Hi!
Trying to build and ZIP the XCUI test suite, but no matter which approach I take, I have issues retrieving the file.

I was only ever able to get the file usually located in DerivedData/**/Build/Products/Debug-iphonesimulator/
never the one which I actually need DerivedData/**/Build/Products/Debug-iphoneos/

In other words, my build target needs to be for generic/device.

Is there a setting I am missing where a runner would be built for a device?
Thank you!

## BUILD AND SAVE XCTEST RUNNER ====================================================
    - name: Build XCUITest via action
      uses: sersoft-gmbh/xcodebuild-action@v2.0.1
      with:
       workspace: TARGET.xcworkspace
       scheme: TARGET-UITests
       destination: generic/platform=iOS
       action: build-for-testing
       cloned-source-packages-path: "SourcePackages"
       allow-provisioning-updates: true

    - name: Save XCUI
      uses: actions/upload-artifact@v3
      with:
        name: TARGET-UITests-Runner.app
        path: TARGET-UITests-Runner.app
        
    - name: Zip Runner
      uses: vimtor/action-zip@v1
      with:
        files: TARGET-UITests-Runner.app
        dest: TARGET-UITests-Runner.zip
@ffried
Copy link
Member

ffried commented Jul 10, 2023

@emin-grbo Do you have an xcodebuild command that does what you want? If so, how does it differ from the one this action generates (it's printed in the logs before actually running it)?

@emin-grbo
Copy link
Author

emin-grbo commented Jul 12, 2023

Thank you for responding @ffried !
This is the default one I was using, but I had issues with it as well and assumed I did something wrong with my initial setup.

run: xcodebuild -workspace ./TARGET.xcworkspace -scheme TARGET-UITests -clonedSourcePackagesDirPath SourcePackages -allowProvisioningUpdates -resolvePackageDependencies -destination generic/platform=iOS build-for-testing

Good note about checking the logs and comparing them. Will do that next 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants