Specify test-suite
While executing your Espresso tests, you must specify the uploaded test-suite that contains your Espresso test cases. In order to do so, you need to pass the testSuite
parameter in the REST API request to start your test execution. You can set its value in one of the following ways :
- Using a test_url value: This is returned in the response to a test-suite upload REST API request.
- Using a custom_id value: This is the custom ID you defined in a test-suite upload REST API request. By default, it will pick the last build of your uploaded test-suite under the given custom ID.
- Using a shareable_id value: This is returned in the response to a test-suite upload REST API request. It enables other users in your organization to test using your uploaded test-suite.
REST API endpoint :
POST /app-automate/espresso/v2/build
Parameter | Description | Values |
---|---|---|
testSuite |
Specify the test-suite that contains Espresso test cases. This is required. | For your uploaded test-suite, use one of these values : <test_url> or <custom_id> or <shareable_id>
|
Example cURL
requests :
Use a sample test_url
to specify the test-suite for your Espresso test execution :
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"
Use sample custom_id
to specify the test-suite in your Espresso test execution :
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": "Calculator", "testSuite": "CalculatorTest"}' \
-H "Content-Type: application/json"
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!