Builds
Each build represents an execution of your Maestro test-suite on one or more devices on BrowserStack. Use our REST API to execute and manage your test builds. In addition, you can fetch build status in real-time as well as obtain access to video recording and other test execution logs.
Get build status
Once a build is started, you can fetch its status using this endpoint. You can obtain the overall summary of your test execution as well as results for each individual test case.
Request parameters
Request
curl -u "username:accesskey"
-X GET "https://api-cloud.browserstack.com/app-automate/maestro/v2/builds/{build_id}"
-
buildID* String
Unique build ID for your Maestro test execution.
Example:5c5ab4338cec13aeb78f7a6977344556ac00bccd6
Response attributes 200
application/json
Response
{
"id": "10cec65e8d86bf4277608fd54ee658592d97130a",
"framework": "maestro",
"duration": null,
"status": "running",
"input_capabilities": {
"devices": [
"OnePlus 8-10.0"
],
"project": "test",
"debugscreenshots": true,
"deviceLogs": "true",
"networkLogs": "true",
"app": "bs://3a8ef0a0c7b81e3be335aadc9cb762ddcd27aedf",
"testSuite": "bs://4b3c60eae996ef4d068e4521e49a5f36bc55b89b",
"execute": [
"master.yml",
"subflows/maestrotest2.yml"
]
},
"start_time": "2025-04-08 07:17:34 UTC",
"app_details": {
"url": "bs://3a8ef0a0c7b81e3be335aadc9cb762ddcd27aedf",
"bundle_id": "org.wikipedia.alpha",
"version": "2.5.194-alpha-2017-05-30",
"name": "WikipediaSample.apk"
},
"test_suite_details": {
"url": "bs://4b3c60eae996ef4d068e4521e49a5f36bc55b89b",
"bundle_id": null,
"version": null,
"name": "TYPE_3.zip",
"custom_id": "9Nov"
},
"devices": [
{
"device": "OnePlus 8",
"os": "android",
"os_version": "10.0",
"sharding": false,
"sessions": [
{
"id": "a5285d3d85af7b9b3d684000f2d32f78c83a57b7",
"status": "running",
"start_time": null,
"duration": null
}
]
}
]
}
-
id String
Unique build ID for your test execution.
Example:5c5ab4338cec13aeb78f7a6977344556ac00bccd6
-
framework String
Name of the automation framework. This is set to Maestro.
-
duration Integer
Total duration for build completion (in seconds). This includes the time taken to install the app and test-suite, and setting up the device along with the test execution time of all the test cases.
-
status Integer
Status of the your build execution. This is computed based on the status of every test case executed in your entire test-suite. Learn more about status API
-
input_capabilities Object
Details about the input parameters passed while starting the build execution.
-
devices Array
List of devices on which the build was executed.
Example:["Samsung Galaxy S20-10.0", "OnePlus 7-9.0"]
-
project String
Name of your project which was set inside the
project
parameter inside the build execution API. -
app String
The
app_url
of the app uploaded on BrowserStack.
Example:bs://9c6dcb5649a8280ca800075bfd8f151115bba6b3
-
testSuite String
The
test-url
of the test-suite uploaded on BrowserStack.
Example: bs://89c874f21852ba57957a3fdc33f47514288c4ba1
-
- Show 4 more
-
start_time String
Timestamp at which the build execution was started
-
app_details Object
Details about the application under test uploaded on BrowserStack
-
url String
The
app_url
of the app(.apk) file uploaded on BrowserStack. -
bundle_id String
Bundle ID or the package name of the app.
-
version String
Version code of the app that was defined in the Android manifest file.
-
name String
Name of your app(.apk) file.
-
-
test_suite_details Object
Details about the test-suite uploaded on BrowserStack
-
url String
The
test_url
of the test-suite(.apk) file uploaded on BrowserStack. -
bundle_id String
Bundle ID or the package name of the test-suite.
-
version String
Version code of the test-suite. The value is null.
-
name String
Name of your test-suite(.apk) file.
-
-
devices Array
Test execution details for each device in the build.
-
device String
The name of the device.
-
os String
By default, this is set to Android.
-
os_version String
OS version.
-
sharding Boolean
Indicates if the sharding was enabled for this build.
-
sessions Array
If sharding is disabled, each session is the execution of your test on a single device. Thus, each device will have a single session. If sharding is enabled, each session is the execution of a single shard on a single device. Thus, each device will have multiple sessions (one for each shard).
-
id String
A unique session ID.
Example:09a018967ec8b2dc5dd391de1130f69463840039
-
status String
Status of this session.
-
start_time String
Timestamp at which the session execution started.
-
duration String
Duration of the session execution.
-
testcases Object
Test case execution summary for this session.
-
count Integer
The total number of test-cases in this session.
-
status Object
Count of test-cases by each status type.
-
passed Integer
Total count of test cases with explicit test assertions that marks the test as passed.
-
failed Integer
Total count of test cases with uncaught exceptions or explicit test assertions that marks test as failed.
-
skipped Integer
Total count of test cases that never got executed by the test runner.
-
timedout Integer
Total count of test cases that got timed-out.
-
error Integer
Total count of test cases that errored due to an unanticipated issue on BrowserStack.
-
running Integer
Total count of test cases that are currently under execution.
-
queued Integer
Total count of test cases that are queued for execution.
-
-
-
-
List recent builds
Fetch 20 recent test builds sorted by timestamp. You can also filter builds by their project name.
Request parameters
Request
curl -u "username:accesskey" \
-X GET "https://api-cloud.browserstack.com/app-automate/maestro/v2/builds"
Request: Using project name
curl -u "username:accesskey" \
-X GET "https://api-cloud.browserstack.com/app-automate/maestro/v2/builds?project=SampleBuild"
-
project String
The project name of the build(s).
Example:Example_test
Response attributes 200
application/json
Response
[
{
"id": "5c5ab4338cec13aeb78f7a6977344556ac00bccd6",
"start_time": "2019-11-06 13:07:45 UTC"
},
{
"id": "235ab7338cec13ae6b8f7a6977344556ac00bccd6",
"start_time": "2020-06-04 07:43:49 UTC"
}
]
-
Array
build ID.
-
Array
Timestamp at which the build execution was started.
Execute a build
Start the execution of a new build on BrowserStack. While making a request, you must specify the application under test, maestro app (Android or iOS) as well as a list of devices to execute your tests on. In addition, you can specify a number of other parameters to customise test execution. Every build has a unique build_id
associated with it. This is returned in the response to this endpoint.
Request parameters
Request for Android
curl -u "username:accesskey" \
-X POST "https://api-cloud.browserstack.com/app-automate/maestro/v2/android/build" \
-H "Content-Type: application/json" \
-d '{"app": "bs://9c6dcb5649a8280ca800075bfd8f151115bba6b3",
"testSuite": "bs://89c874f21852ba57957a3fdc33f47514288c4ba1",
"project": "Maestro_Test",
"devices": ["Samsung Galaxy S20-10.0", "Google Pixel 3-9.0"]}'
Request for iOS
curl -u "username:accesskey" \
-X POST "https://api-cloud.browserstack.com/app-automate/maestro/v2/ios/build" \
-H "Content-Type: application/json" \
-d '{"app": "bs://9c6dcb5649a8280ca800075bfd8f151115bba6b3",
"testSuite": "bs://89c874f21852ba57957a3fdc33f47514288c4ba1",
"project": "Maestro_Test",
"devices": ["iPhone 15-17.0"]}'
-
app* String
Specify the application under test. Use
app_url
orcustom_id
orshareable_id
of a previously uploaded app. -
testSuite* String
Specify a Maestro test suite. Use
test_url
orcustom_id
orshareable_id
of a previously uploaded test-suite. -
devices* Array
List of devices to execute your tests on.
Example:['Samsung Galaxy S8-7.0', 'Google Pixel 3-10.0']
-
project String
Unique identifier to logically group multiple builds together. Accepted characters are
A-Z
,a-z
,0-9
,.
,-
,_
. All other characters are ignored. -
buildTag String
A custom tag for your builds. Accepted characters are
A-Z
,a-z
,0-9
,.
,-
,_
. All other characters are ignored. -
projectNotifyURL String
Specify a callback URL to enable BrowserStack to notify you upon the completion of all builds under the given project. You will receive a callback if no new builds triggered for 5 mins and all existing builds have finished execution.
Note: Set this parameter along with the
project
parameter.
Response attributes 200
application/json
Response
{
"message": "Success",
"build_id": "5c5ab4338cec13aeb78f7a6977344556ac00bccd6"
}
-
message String
Status of the request.
-
build_id String
A unique identifier for your test execution.
Example:5c5ab4338cec13aeb78f7a6977344556ac00bccd6
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.