Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

Define custom ID to upload Espresso test suite

Use custom ID to upload Espresso test suite to test on BrowserStack App Automate.

On every test suite upload, a new value for test_url is generated. You need to use this value to execute your Espresso tests with the latest build of your Espresso test suite.

If you want to use a constant value to specify the test suite and don’t want to modify your scripts after every build upload, you can define a custom ID for your test suite. Use the same custom ID every time you upload a new build of the test suite. Here is an example cURL request to upload an Espresso test suite with the custom ID defined as CalculatorAppTest:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/test-suite" \
-F "url=https://www.browserstack.com/app-automate/sample-apps/android/CalculatorTest.apk" \
-F "custom_id=CalculatorAppTest"

A sample response to the above API request is shown below:

 {
    "test_url":"bs://f7c874f21852ba57957a3fdc33f47514288c4ba4", 
    "custom_id":"CalculatorAppTest"
 }

While executing your Espresso tests, use the custom_id value (CalculatorAppTest in the above example) to specify the Espresso test suite. The test execution picks the last uploaded build corresponding to that custom ID.

  • The use of custom ID is optional.
  • The maximum character limit in the custom_id parameter is 100 and the characters allowed are a-z, A-Z, 0-9, period(.), underscore(_), and hyphen(-).
  • custom_id applies only to the individual user who uploaded the app. Other users in the same Group ID cannot reference the app using only the custom_id.

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

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy Check Circle