Set localization options
To test a localized version of your app, you can configure language, locale and timezone settings on the device for your Espresso test execution.
Language
In order to test a localized version of your app, you can change the language of the application under test (It doesn’t affect the language of the device). In order to do so, you need to 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
In order to test a localized version of your app, you can also set a device locale. In order to do so, you need to 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 in order to configure your tests to run on a custom timezone. In order to do so, you need to 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) You can view 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. You can check paid plans here.
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!