Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found

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

  1. From the schemes dropdown, select the app scheme, and device as Generic iOS devic

  2. ProductClean (Cmd Shift K)

  3. ProductBuild ForTesting (Cmd Shift U)

  4. Use Xcode’s Project Navigator to right click on .app file and navigate to Show in Finder option

  5. In the finder, select the appropriate <AppnameUITests>-Runner.app and navigate to the compress option. This should generate <AppnameUITests>-Runner.zip file

Generate zip file in finder by selecting appropriate Runner.app

Select the .app file and click on compress option

Using command-line tools

You can also automate the above process using the following steps:

  1. 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

  2. From the command line, change to the derivedData directory. To know the location of your derivedDatadirectory, visit Xcode → Preferences → Locations.

  3. 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.

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

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy Check Circle