Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

Custom Device Lab with XCUITest

Run XCUITest automation on Custom Device Lab for native iOS app testing.

To run XCUITest tests on Custom Device Lab hosted on BrowserStack’s private cloud, use the same REST API endpoint and workflow described in the XCUITest documentation, with a few additional parameters specific to Custom Device Lab.

Prerequisites

Key differences from public cloud

The overall workflow is the same, but you need to include the following additional parameters in your REST API request to target Custom Device Lab.

Sample API request using Custom Device Lab to execute your test

Terminal
Copy icon Copy


The table below explains the parameters used in the REST API request:

Parameter Required Description
dedicatedDevice Yes Set this to true to indicate that the test should run on a Custom Device Lab device. This tells BrowserStack to route the test to your Custom Device Lab device pool instead of the public cloud.
deviceId Yes The deviceId is the same as UDID. It is a unique identifier of the Custom Device Lab device on which you want to run the test. You can retrieve this ID from the udid field of the Custom Device Lab REST API response.
devices Yes An array specifying the device name and OS version in the format "deviceName-deviceOSVersion". For example, "Samsung Galaxy S21-11.0". Build this value from the device and os_version fields that the Custom Device Lab REST API returns for that device. This parameter is required even when deviceId is also set.

Build devices from the device and os_version values of one device in the Custom Device Lab REST API response. Use the udid of that device as deviceId. Do not reuse a device name from the public device list.

If devices names a valid public cloud device instead of the one matching deviceId, the request still passes validation. BrowserStack then runs the test on the public device pool. Your dedicated device stays idle. No error flags the mismatch.

Next steps

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