Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found
Connect and get help from 7,000+ developers on our Discord community. Ask the CommunityAsk the Community

Organize your XCUI tests

Organize XCUI Tests by logical grouping to access all related test executions on BrowserStack App Automate dashboard and also while fetching test results using REST API.

You can logically group multiple XCUI test executions under a single project. This helps you easily access all related test executions on the App Automate dashboard and also while fetching test results using REST API.

To group XCUI test executions under a given project, you need to pass the project parameter in the REST API request to start your test execution. You can set its value as shown in the table below.

REST API endpoint :

POST /app-automate/xcuitest/v2/build
Parameter Description Values
project A unique identifier to logically group multiple test executions together String
Only letters (A-Z, a-z), digits (0-9), periods (.), colons (:), hyphens (-), square brackets ([]), forward slashes (/), asperands (@), ampersands (&), single quotes (‘), and underscores (_) are allowed.
Default: Untitled Project
buildTag A custom tag for your builds String
Only letters (A-Z, a-z), digits (0-9), periods (.), colons (:), hyphens (-), square brackets ([]), forward slashes (/), asperands (@), ampersands (&), single quotes (‘), and underscores (_) are allowed. Any other characters are ignored. Any other characters are ignored.
customBuildName A custom name for your build String
Optional. Only letters (A-Z, a-z), digits (0-9), periods (.), colons (:), hyphens (-), square brackets ([]), forward slashes (/), at signs (@), ampersands (&), single quotes (‘), and underscores (_) are allowed. Any other characters are ignored. If an invalid build name is passed, the capability is ignored and the system falls back to the current naming workflow. Multiple builds can have the same customBuildName, but the build name shown on the Dashboard will be incremented sequentially (for example, “Build #1: sample.apk”, “Build #2: sample.apk”, and so on).

Example cURL requests:

Both the test executions shown below specify the same value for the project parameter. Accordingly, they will be grouped together under the same project Dashboard-v2

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/build" \
-d '{"project" : "Dashboard-v2", "devices": ["iPhone 8 Plus-11.0"], "app": "bs://f5L3azt9pLzE995f49376eb1fa3c284dc321f8d", "testSuite": "bs://6eb1fa3c284ddbe9971b2d1aee0d52943b9c081"}' \
-H "Content-Type: application/json"


curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/build" \
-d '{"project" : "Dashboard-v2", "devices": ["iPhone 8 Plus-11.0"], "app": "bs://f5L3azt9pLzE995f49376eb1fa3c284dc321f8d", "testSuite": "bs://aee0d52943dbe9971b2d1a2943be43b9c081"}' \
-H "Content-Type: application/json"

Add custom build names

You can add a custom name to your builds using the customBuildName capability. This is an optional parameter that allows you to assign a specific name to your build, making it easier to identify and manage your test executions on the App Automate dashboard and when fetching test results using REST API.

Example cURL request:

The following code shows how the customBuildName capability is used to add a custom build name:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/build" \
-d '{"project" : "Dashboard-v2",  "devices": ["iPhone 8 Plus-11.0"], "app": "bs:/12474f21852ba5233fdc33f47514288c4ba4", "testSuite": "bs://e994db8333e32a5863938666c3c3491e1231", "networkLogs": "false", "disableAnimations": "true", "deviceLogs": "true", "video": "true", "customBuildName": "My Custom Build Name"}' \
-H "Content-Type: application/json"

Add build tags

You can add a custom build tag to your builds using the buildTag capability. You can filter your builds according to the assigned tag on the App Automate dashboard.

Example cURL requests :

The following code shows how the buildTag capability is used to add a build tag:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/build" \
-d '{"project" : "Dashboard-v2",  "devices": ["iPhone 8 Plus-11.0"], "app": "bs:/12474f21852ba5233fdc33f47514288c4ba4", "testSuite": "bs://e994db8333e32a5863938666c3c3491e1231", "networkLogs": "false", "disableAnimations": "true", "deviceLogs": "true", "video": "true", "project": "Sanity", "buildTag": "Laser Tag"}' \
-H "Content-Type: application/json"

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