Execute Flutter integration tests using BrowserStack App Automate
Execute your Flutter integration tests on real Android and iOS devices using BrowserStack App Automate
To run your Flutter integration tests on BrowserStack App Automate, first, choose the OS of your choice:
To run your Flutter integration tests on Android devices, follow these steps:
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.
Upload your app and test suite
Before running your tests, ensure that you have uploaded your app and Flutter test suite to BrowserStack App Automate.
Run your Flutter integration tests
Use the builds API to execute your tests. The builds
API mandates the following parameters:
app
: Set this to either the app URL, the custom ID, or the shareable ID of your app. To learn more, refer to the upload apps.
testSuite
: Set this to either the test suite URL, the custom ID, or the shareable ID of your test suite. To learn more, refer to the upload test suites.
devices
: Specify the device and the OS version on which you want to test your app. Use the device selector below to select your device.
Use the cURL request below to your Flutter integration execute tests:
Refer to our supported devices list to delect a device of your choice.
-
To specify devices using regular expressions (regex), refer to specify devices using regex page.
-
The above command uses sample values for
app
andtestSuite
. Use actual values when running your tests.
You can execute tests on multiple devices too. For more information, refer to the Execute a build API documentation.
Review the API response
Upon executing a successful API request, you receive a response similar to the following:
{
"message": "Success",
"build_id": "741c219db523cb51d4cdf35723ce3bfc592fb74a"
}
The build_id
returned in the API response is a unique identifier for your test execution. Each test build represents the execution of your Flutter test suite on all selected devices.
Once you start the Flutter test execution using REST API, you can access the test execution results on the App Automate dashboard.
For a complete list of parameters that you can use for your Flutter integration test execution, refer to our Flutter Build API reference.
Related topics
-
Manage your uploaded apps using our REST API.
-
Use the recent apps API endpoint to list your recently uploaded apps.
-
Delete your uploaded apps using the delete app API endpoint.
To run your Flutter integration tests on iOS devices, follow these steps:
Upload your test package
Before running your tests, ensure that you have uploaded your test package to BrowserStack App Automate.
Run your Flutter integration tests
Use the builds REST API to execute your tests. The builds
API mandates the following parameters:
testPackage
: Set this to either the test package URL, the custom ID, or the shareable ID of your test package. To learn more, refer to the upload your test package.
devices
: Specify the device and the OS version on which you want to test your app. Use the device selector below to select your device. Each value in the list follows this format: <devicename>-<os version>
.
To specify devices using regular expressions (regex), refer to specify devices using regex page.
Use the cURL
request below to execute your Flutter integration tests:
Refer to our supported devices list to delect a device of your choice.
You can execute tests on multiple devices too. For more information, refer to the Execute a build API documentation.
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.
Review the API response
Upon executing a successful API request, you receive a response similar to the following:
{
"message": "Success",
"build_id": "741c219db523cb51d4cdf35723ce3bfc592fb74a"
}
The build_id
returned in the API response is a unique identifier for your test execution. Each test build represents the execution of your Flutter test suite on all selected devices.
Once you start the Flutter test execution using REST API, you can access the test execution results on the App Automate dashboard.
Related topics
-
Manage your uploaded test package using our REST API.
-
Use the list test package API endpoint to list your recently uploaded test package.
-
Delete your uploaded test package using the delete test package 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!