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

Steps needed to migrate XCUI Tests

  • This would apply in case you are using the CLI or App Center Task for Azure Pipelines to trigger XCUI tests on App Center or the
  • You would need to first signup for a BrowserStack Account here
  • Once you have signed up, you need to purchase a plan on BrowserStack. You can see all the plans here
  • You can use App Automate’s XCUI APIs to migrate from the App Center to BrowserStack. It would be as simple as performing 3 API calls with the relevant params to run all the tests on BrowserStack.
  • You can read more about the App Automate’s XCUI APIs here
  • The first of the 3 API calls mentioned above would be to upload the App
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/app" \
-F "file=@/path/to/app/file/Application-debug.apk"
  • The second of the 3 API calls mentioned above would be to upload the Test Suite APK.
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/test-suite" \
-F "file=@/path/to/app/file/Application-debug-test.apk"
  • The last of the 3 API calls mentioned above would be to upload the finally trigger the test with the relevant params. You can find the documentation here - Execute a Build API

  • You would probably be using a CLI command like this - appcenter test run xcuitest \ --app "${APP}" \ --devices "${1}" \ --build-dir "${WORKSPACE}" \ --test-series "${SERIES}" \ --token "${APPCENTER_TOKEN}" \ --disable-telemetry
  • This CLI command has multiple parameters like app & devices
  • For each one of these CLI paramaters you can find an equivalent param for the XCUI API, you can find documentation on each param in the API over here
  • All you would need to do would be to convert each one of the CLI params to API params and then trigger the tests on BrowserStack using the Execute Build API.
  • The final API call would look something like this. Once this API call is done, BrowserStack will take care of running the XCUI Tests.
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/build" \
-d '{"app": "bs://9c6dcb5649a8280ca800075bfd8f151115bba6b3", "testSuite": "bs://89c874f21852ba57957a3fdc33f47514288c4ba1","project" : "XCUI_Test", "devices": ["iPhone 11-13"]}' \
-H "Content-Type: application/json"
  • XCUI Support on BrowserStack is also available in case you are using XCTest Plans too. You can refer to this documentation

Further Troubleshooting

  • There are certain Core Concepts in App Center defined here , for each one of these Core Concepts in App Center, there is one in BrowserStack. We are listing them down below
  • The core concept of ‘Device Configuration’ in App Center is a combination of device model and operating system version. You can select the same device & OS version you want on BrowserStack too. You can read more on that here.
  • Similar to how there are Device Tier’s in App Center , there are Device Tiers in BrowserStack too , you can read more about them here.
  • The core concept of ‘Device Concurrency’ in App Center will map to the concept of Parallels in App Automate.
  • The core concept of ‘Test Run’ & ‘Test Report’ would equate to an XCUI Session & it’s Reports on BrowserStack. You can see your XCUI Sessions on either the Dashboard or you can use our API.
  • The core concept of ‘Test Series’ which is an arbitrary system for organizing your test runs, maps directly to the ‘Build Name’ in BrowserStack’s API params. Also BrowserStack provides multiple other ways of organising your tests, you can read more on that here.
  • The screenshots for XCUI tests are available with BrowserStack via the result bundle for XCUI you can read more on that here.. Also a video is available for all your XCUI tests on BrowserStack.

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