Specify application under test
While executing your XCUI tests, you must specify the uploaded app to run your XCUI test cases on. In order to do so, you need to pass the app
parameter in the REST API request to start your test execution. You can set its value in one of the following ways :
-
Using an
app_url
value: This is returned in the response to an app upload REST API request. -
Using a
custom_id
value: This is the custom ID you defined in an app upload REST API request. By default, it will pick the last build of your uploaded app under the given custom ID. -
Using a
shareable_id
value: This is returned in the response to an app upload REST API request. It enables other users in your organization to test an app you uploaded.
REST API endpoint :
POST /app-automate/xcuitest/v2/build
Parameter | Description | Values |
---|---|---|
app |
Specify the application under test for your XCUI tests. This is required. | For your uploaded app, use one of these values : <app_url> or <custom_id> or <shareable_id>
|
Example cURL
requests :
Use a sample app_url
to specify the application under test for your XCUI test execution :
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/build" \
-d '{"devices": ["iPhone X-11"], "app": "bs://f7c874f21852ba57957a3fdc33f47514288c4ba4", "testSuite": "bs://e994db8333e32a5863938666c3c3491e778352ff"}' \
-H "Content-Type: application/json"
Use a sample custom_id
to specify the application under test for your XCUI test execution :
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/build" \
-d '{"devices": ["iPhone X-11"], "app": "SampleApp", "testSuite": "SampleTest"}' \
-H "Content-Type: application/json"
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!