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/81af471efee397ce3e60263ef6f54fc6deb57368"
-
buildID* String
Unique build ID for your Flutter test execution.
Example:81af471efee397ce3e60263ef6f54fc6deb57368
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 3-9.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:81af471efee397ce3e60263ef6f54fc6deb57368
-
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 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 "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/builds?project=Flutter_Test"
-
project String
The project name of the build(s).
Example:Flutter_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
List of recent test builds sorted by timestamp
-
id String
Build ID.
-
start_time String
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, 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": "bs://j3c874f21852ea50957a3fdc33f47514288c4ba4", "testSuite": "bs://f7c874f21852ba57957a3fde31f47514288c4ba4", "project" : "Flutter_Test", "devices": ["Samsung Galaxy S9 Plus-9.0"]}' \
-H "Content-Type: application/json"
-
app* String
Specify the application under test. Use
app_url
orcustom_id
orshareable_id
of a previously uploaded app. -
testSuite* String
Specify a Flutter 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. 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 8 more
-
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. -
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
autoGrantPermissions
totrue
when 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:81af471efee397ce3e60263ef6f54fc6deb57368
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.