Execute tests
After uploading your app and Espresso test-suite, you are ready to run your Espresso tests on BrowserStack App Automate. Its easy to execute your tests using the REST API. Here is an example cURL
request to start the execution of your Espresso tests :
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/build" \
-d '{"devices": ["Samsung Galaxy S8-7.0"], "app": "bs://f7c874f21852ba57957a3fdc33f47514288c4ba4", "testSuite": "bs://e994db8333e32a5863938666c3c3491e778352ff"}' \
-H "Content-Type: application/json"
In the above example, the devices
parameter is used to specify a list of Android devices to test your app on. The app
parameter is used to specify the application under test uploaded to BrowserStack. The testSuite
parameter is used to specify the Espresso test-suite uploaded to BrowserStack.
app
, testSuite
and devices
are mandatory parameters in the API request to start the test execution.
A sample response to the above API request is shown below :
{
"message": "Success",
"build_id": "741c219db523cb51d4cdf35723ce3bfc592fb74a"
}
The build_id
returned in the API response is used to uniquely identify your test execution. Each test build is an execution of your Espresso test-suite on all selected devices.
If your tests fail with a NO TESTS RAN
error, refer to the No tests ran documetation.
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!