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

Use different localization options for Espresso tests

Test localized version of your app by changing the language, locale, and timezone settings for your Espresso test executions on BrowserStack App Automate.

Simulating a device’s regional settings helps you verify that your app shows the correct translations, date formats, and currency for users in different markets. Configure the following localization parameters when starting your Espresso test execution.

Language

To test a localized version of your app, you can change the language of the application under test. This doesn’t affect the language of the device. To do so, use the language parameter in the API request to start Espresso test execution.

REST API endpoint:

POST /app-automate/espresso/build
Parameter Description Values
language Set the language of the app under test. Example: fr

Example:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/build" \
-d '{"language": "fr", "devices": ["Samsung Galaxy S8-7.0"], "app": "bs://f7c874f21852ba57957a3fdc33f47514288c4ba4", "testSuite": "bs://e994db8333e32a5863938666c3c3491e778352ff"}' \
-H "Content-Type: application/json"

Locale

To test a localized version of your app, you can also set a device locale. To do so, use the locale parameter in the API request to start Espresso test execution.

REST API endpoint:

POST /app-automate/espresso/build
Parameter Description Values
locale Set locale Example: CA
Format: Country name abbreviation

Example:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/build" \
-d '{"locale": "CA", "devices": ["Samsung Galaxy S8-7.0"], "app": "bs://f7c874f21852ba57957a3fdc33f47514288c4ba4", "testSuite": "bs://e994db8333e32a5863938666c3c3491e778352ff"}' \
-H "Content-Type: application/json"

Timezone

You can set a device timezone to configure your tests to run on a custom timezone. To do so, use the timezone parameter in the REST API request to start Espresso test execution.

REST API endpoint:

POST /app-automate/espresso/build
Parameter Description Values
timezone Configure tests to run on a custom time zone. Example:
UTC
New_York (for America/New_York)
Los_Angeles (for America/Los_Angeles)
La_Rioja (for America/Argentina/La_Rioja)
Check out the complete list of timezones on Wikipedia.

Example:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/build" \
-d '{"timezone": "New_York", "devices": ["Samsung Galaxy S8-7.0"], "app": "bs://f7c874f21852ba57957a3fdc33f47514288c4ba4", "testSuite": "bs://e994db8333e32a5863938666c3c3491e778352ff"}' \
-H "Content-Type: application/json"
  • The device timezone feature is not supported on Xiaomi, Huawei, Oppo, and Vivo devices on Android.

  • Timezone, language, and locale features are only available with a BrowserStack Paid plan. Check out BrowserStack pricing for App Automate for plan details.

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