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
-
Ensure you have a BrowserStack Username and Access Key. You can obtain your
usernameandaccess keyfrom the Account & Profile section on the dashboard. If you have not yet created an account, sign up for a Free Trial. -
Upload your application and test suite.
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
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
- View test results on App Automate dashboard along with debugging logs, and overall test details.
- Refer to the XCUITest API reference for a full list of available capabilities and endpoints.
- Visit the Custom Device Lab documentation to learn how to manage and monitor your dedicated devices.
- Contact BrowserStack support if you need help configuring tests for Custom Device Lab.
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!