Build and export test-suite
In order to test your native and hybrid iOS apps on BrowserStack using XCUITest, you need to build and upload both the app (.ipa
file) as well as XCUI test-suite (.zip
file) to BrowserStack. If you do not have a .zip
file for your test-suite, follow step by step instructions on this page to generate the zip
file.
Using XCode
-
From the schemes dropdown, select the app scheme, and device as Generic iOS devic
-
Product → Clean (
Cmd Shift K
) -
Product → Build For → Testing (
Cmd Shift U
) -
Use Xcode’s Project Navigator to right click on
.app
file and navigate to Show in Finder option -
In the finder, select the appropriate
<AppnameUITests>-Runner.app
and navigate to the compress option. This should generate<AppnameUITests>-Runner.zip
file
Using command-line tools
You can also automate the above process using the following steps:
-
Build the project for testing. Change to the project directory and run the following command to build for testing:
xcodebuild -scheme <scheme-name> build-for-testing
-
From the command line, change to the derivedData directory. To know the location of your derivedDatadirectory, visit Xcode → Preferences → Locations.
-
In order to create the
zip
file, run the following commands:
cd <app_name>-<random_characters>
# You can get the exact name of the last updated directory by ls -lrt
cd Build/Products
cd Debug-iphoneos
zip --symlinks -r <MyAppUITests>.zip <AppnameUITests>-Runner.app
Once the .zip
file is ready, you are ready to upload it to BrowserStack servers using our REST API.
Related topics
-
Manage your uploaded app or test suite using our upload app REST API and upload test suite REST API.
-
Use the get app API endpoint and list test suites API endpoint to list your recently uploaded apps and test suites.
-
Delete your uploaded app or test suite using the delete app API endpoint and delete test suite API endpoint.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!