Builds
Each build represents an execution of your Flutter Android 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 "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/android/builds/<build_id>"
-
build_id* String
Unique build ID for your Flutter test execution.
Example:<build_id>
Response attributes 200 application/json
Response
{
"id":"81af471efee397ce3e60263ef6f54fc6deb57368",
"framework":"flutter integration tests",
"duration":1438,
"status":"failed",
"input_capabilities":{
"devices":[
"Samsung Galaxy S9 Plus-9.0",
"Google Pixel 7-13.0",
"Samsung Galaxy M32-11.0"
],
"project":"Flutter_Test",
"app":"bs://f31481408d69eafc5b244a516b0c6160e00e003a",
"testSuite":"bs://2753612e098126a07c03f96641563513239e0ccc"
},
"start_time":"2023-08-23 05:39:24 UTC",
"app_dir_details":{
"url":"bs://2753612e098126a07c03f96641563513239e0ccc",
"bundle_id":"com.exacq.ExacqVisionLite.test",
"version":"",
"name":"app-debugg-testsuite.apk"
},
"devices":[
{
"device":"Samsung Galaxy S9 Plus",
"os":"android",
"os_version":"9.0",
"sharding":false,
"sessions":[
{
"id":"09a018967ec8b2dc5dd391de1130f69463840039",
"status":"failed",
"start_time":"2023-08-23 05:40:25 +0000",
"duration":1377,
"testcases":{
"count":2,
"status":{
"passed":1,
"failed":1,
"skipped":0,
"timedout":0,
"error":0,
"running":0,
"queued":0
}
}
}
]
},
{
"device":"Google Pixel 3",
"os":"android",
"os_version":"10.0",
"sharding":false,
"sessions":[
{
"id":"a009f8b3e84509627a39c9c84d03079d64779c3f",
"status":"failed",
"start_time":"2023-08-23 05:39:53 +0000",
"duration":1352,
"testcases":{
"count":2,
"status":{
"passed":1,
"failed":1,
"skipped":0,
"timedout":0,
"error":0,
"running":0,
"queued":0
}
}
}
]
},
{
"device":"Samsung Galaxy M32",
"os":"android",
"os_version":"11.0",
"sharding":false,
"sessions":[
{
"id":"54540a976514430031755debc9c6e42fd029c8f3",
"status":"error",
"start_time":"2023-08-23 05:40:13 +0000",
"duration":920,
"error":{
"message":"No test cases were executed. If you are trying to filter test-cases by using class, package, annotation or size parameters, please specify valid parameters and execute the test again. Check https://www.browserstack.com/docs/app-automate/fluttertest/select-test-cases for reference.",
"code":null
},
"testcases":{
"count":0,
"status":{
"passed":0,
"failed":0,
"skipped":0,
"timedout":0,
"error":0,
"running":0,
"queued":0
}
}
}
]
}
]
}
-
id String
Unique build ID for your test execution.
Example:<build_id> -
framework String
Name of the automation framework. This is set to Flutter.
-
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 String
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
▶ SHOW VALUESDetails about the input parameters passed while starting the build execution.
-
devices Array
List of devices on which the build is executed.
Example:["Samsung Galaxy S20-10.0", "OnePlus 7-9.0"] -
project String
Name of your project which is set inside the
projectparameter inside the build execution API. -
app String
The
app_urlof the app uploaded on BrowserStack.
Example:bs://9c6dcb5649a8280ca800075bfd8f151115bba6b3 -
testSuite String
The
test-urlof 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
▶ SHOW VALUESDetails about the application under test uploaded on BrowserStack
-
url String
The
app_urlof 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 is defined in the Android manifest file.
-
name String
Name of your app(.apk) file.
-
-
test_suite_details Object
▶ SHOW VALUESDetails about the test-suite uploaded on BrowserStack
-
url String
The
test_urlof 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
▶ SHOW VALUESTest 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 is enabled for this build.
-
sessions Array
▶ SHOW VALUESIf 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
▶ SHOW VALUESTest case execution summary for this session.
-
count Integer
The total number of test-cases in this session.
-
status Object
▶ SHOW VALUESCount 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 the most recent test builds sorted by timestamp. By default, it returns the last 10 builds. You can also filter builds by their project name or status, and paginate through your data.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/android/builds?project=Flutter_Test"
# Limit the number of builds to be displayed using the "limit" parameter
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/android/builds?limit=5"
# Fetch builds from a specific position using the "offset" parameter
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/android/builds?limit=10&offset=20"
# Filter builds using the "status" parameter
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/android/builds?status=running"
-
project String
The project name of the build(s).
Example:Flutter_Test -
limit String
Specify the number of builds to fetch. The default value is 10, and the maximum permitted value is 100.
-
offset String
Retrieve a list of builds from a particular point using the
offsetparameter. Useoffsetin conjunction with thelimitparameter. -
status String
Filter recent builds based on the build status. The possible values are
running,done,timeout, andfailed.
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
▶ SHOW VALUESList of recent test builds sorted by timestamp
-
id String
Build ID.
-
start_time String
Timestamp at which the build execution is started.
-
Execute a build
Start the execution of a new build on BrowserStack. While making a request, you must specify the application under test, Flutter Android app 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
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/android/build" \
-d '{"app": "<app_id>", "testSuite": "<test_suite_id>", "project" : "Flutter_Test", "devices": ["Samsung Galaxy S9 Plus-9.0"]}' \
-H "Content-Type: application/json"
# Set a custom build name and a build-specific callback URL using "customBuildName" and "callbackURL"
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/android/build" \
-d '{"app": "<app_id>", "testSuite": "<test_suite_id>", "devices": ["Samsung Galaxy S9 Plus-9.0"], "customBuildName": "Regression_Build_42", "callbackURL": "https://example.com/callback"}' \
-H "Content-Type: application/json"
-
app* String
Specify the application under test. Use
app_urlorcustom_idof a previously uploaded app. -
testSuite* String
Specify a Flutter test suite. Use
test_urlorcustom_idof a previously uploaded test-suite. -
devices* Array
List of devices to execute your tests on. Learn more about selecting devices
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. - Show 10 more
-
customBuildName String
A custom, human-readable name for this build. Displayed in the App Automate dashboard build list in place of the auto-generated name. 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. -
callbackURL String
Specify a callback URL to enable BrowserStack to notify you upon completion of this specific build. This is different from
projectNotifyURL, which fires only after all builds under the given project have finished execution. -
gpsLocation String
Simulate the location of the device to specific GPS coordinates. Specify latitude followed by longitude. Learn more about gpsLocation.
Example:40.730610,-73.935242 -
networkProfile String
Simulate different network conditions while testing your app.
Example:2g-gprs-good,2g-gprs-lossy. View the list of supported network profiles. -
customNetwork String
Simulate custom network condition while testing your app. Specify download speed (kbps), upload speed (kbps), latency (ms), packet loss (%).
Example:1000, 1000, 100, 1 -
language String
Set the language of the app under test.
Example:fr(for French) -
locale String
Set locale to test the localized version of your app.
Example:fr_CA(for French-Canada) -
timezone String
Set timezone to configure tests to run in a custom time zone.
Example:UTC -
autoGrantPermissions String
To grant all permissions, set
autoGrantPermissionstotruewhen running a build.
Response attributes 200 application/json
Response
{
"message": "Success",
"build_id": "81af471efee397ce3e60263ef6f54fc6deb57368"
}
-
message String
Status of the request.
-
build_id String
A unique identifier for your test execution.
Example:<build_id>
Stop builds
If a test run stops due to a crash, you can stop the build by clicking the stop build button on the App Automate dashboard or using the REST API using the build ID of the build you want to stop.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/builds/<build_id>/stop" \
-H "Content-Type: application/json"
-
build_id* String
The build ID of the build you want to stop.
Response attributes 200 application/json
Response
{"message":"Stopping build","stopped_session_count":1}
-
String
▶ SHOW VALUESSuccess message of build stop.
-
message String
Message, “Stopping build”.
-
stopped_session_count String
Number of times the session has been stopped.
-
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.