Skip to content

Test in different locales ​

Test your app in multiple languages and regions using locale configuration.

Testing how your app handles different languages and regional formats is critical for a global user base. The locale is a device-level setting, so it is not part of the flow itself: there is no place in a flow, including launchApp or config.yaml, to set it.

Astra Scout does not set the device locale

Maestro sets the locale with --device-locale when it creates a device from its command line. Astra Scout has no such option. Change the language and region in the device's own settings, or when you create the simulator or emulator, then run your flows as usual.

Set the locale ​

  • iOS Simulator: open Settings > General > Language & Region on the simulator, or recreate the simulator with the language you need.
  • Android emulator: open Settings > System > Languages on the emulator, or create the AVD with the language you need.
  • Real devices: change the language in the device settings.

Astra Scout keeps using whatever locale the device has when you run a flow.

Combine locales and tags ​

If certain flows should only run in specific languages (for example, flows that validate French translations), tag them and select those tags when you run. First, define a tag in the flow:

yaml
# flows/login_fr.yaml
appId: com.example.app
tags:
  - french
---
- launchApp
- assertVisible: "Bienvenue"

Then, with the device set to French, create an environment whose Include Tags contains french and select it before you run the workspace. Only the flows tagged french run. See Test discovery and tags.