Features

Set Maestro version

By default, TestingBot will run your Maestro Flows with the latest version of Maestro CLI.

If you prefer to run a specific version of Maestro, you can specify a version option.

Copy code
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/maestro/:id/run" \
-d '{ "maestroOptions": { "version": "1.32.0" }, "capabilities":[{"platform":"ANDROID", "version":12, "deviceName":"Pixel 6", "platformName":"Android"}]}' \
-H "Content-Type: application/json"

Replace the :id with the identifier you received during the app upload call.

Maestro config.yaml

You can include the config.yaml Maestro workspace configuration file in the Maestro flows zip file. This global configuration file contains options related to Maestro and Maestro Cloud which can be used with TestingBot. These options are currently supported on TestingBot:

  • includeTags: tests that contain these tags will be run
  • excludeTags: tests that contain these tags will NOT be run
  • env: environment variables that can be used in multiple flows

Maestro Environment Variables

You can pass along one or more environment variables to Maestro, by specifying this in the maestroOptions as env.

Copy code
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/maestro/:id/run" \
-d '{ "maestroOptions": { "env": { "APP_ID": "com.testingbot.sample" } }, "capabilities":[{"platform":"ANDROID", "version":12, "deviceName":"Pixel 6", "platformName":"Android"}]}' \
-H "Content-Type: application/json"

Maestro Include Tags

You can set the --include-tags by specifying this in the maestroOptions. This makes sure to only run the flows that include the specific tag(s).

Copy code
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/maestro/:id/run" \
-d '{ "maestroOptions": { "includeTags": ['tag1', 'tag2'] }, "capabilities":[{"platform":"ANDROID", "version":12, "deviceName":"Pixel 6", "platformName":"Android"}]}' \
-H "Content-Type: application/json"

Maestro Exclude Tags

You can set the --exclude-tags by specifying this in the maestroOptions. This makes sure to not run the flows that include the specific tag(s).

Copy code
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/maestro/:id/run" \
-d '{ "maestroOptions": { "excludeTags": ['tag1', 'tag2'] }, "capabilities":[{"platform":"ANDROID", "version":12, "deviceName":"Pixel 6", "platformName":"Android"}]}' \
-H "Content-Type: application/json"

Maestro IP Geolocation

TestingBot's GeoIP feature allows you to test your app from various parts of the world, by using IP addresses in over 20 different countries.
When you enable GeoIP, traffic originating from the device which is running your Maestro test(s) will come from an IP address in the country you specified.

To get started with location testing, you can specify the testingbot.geoCountryCode option when starting a Maestro test.
Please see the example below where we specify that the app should connect through Germany.

Copy code
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/maestro/:id/run" \
-d '{ "capabilities":[{"version":"17.2", "deviceName":"iPhone 13", "platformName":"iOS", "testingbot.geoCountryCode":"DE"}]}' \
-H "Content-Type: application/json"

The DE abbreviation is the ISO code of Germany. You can find other GeoIP country codes to use.

Maestro Network Throttling

TestingBot provides a throttle network feature, which will simulate specific network conditions during a Maestro test.

We offer various presets:

  • Edge:
    • 250kbps download
    • 150kbps upload
    • 0% Loss
    • 300ms Latency
  • 3G:
    • 400kbps download
    • 100kbps upload
    • 0% Loss
    • 100ms Latency
  • 4G:
    • 18000kbps download
    • 9000kbps upload
    • 0% Loss
    • 100ms Latency
  • airplane:

    Simulates Airplane Mode (no network connectivity)

  • disable:

    Revert the throttling to no throttling.

We also offer the possibility to specify your own download, upload, loss and latency values.

You can pass a preset or specific options at the start of your test (through the capabilities), or during the test (with execute_script).

Copy code
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/maestro/:id/run" \
-d '{ "capabilities":[{"version":"17.2", "deviceName":"iPhone 13", "platformName":"iOS", "throttle_network":"4G"}]}' \
-H "Content-Type: application/json"

Change Test Name

You can change how your test name appears in the TestingBot dashboard by specifying a name option.

Copy code
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/maestro/:id/run" \
-d '{ "capabilities":[{"version":"17.2", "deviceName":"iPhone 13", "platformName":"iOS", "name":"My Maestro Test"}]}' \
-H "Content-Type: application/json"

Device Orientation

You can switch the orientation of the device at the beginning of your Maestro test, by specifying a orientation option, which by default is PORTRAIT. The options are either PORTRAIT or LANDSCAPE.

Copy code
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/maestro/:id/run" \
-d '{ "capabilities":[{"version":"17.2", "deviceName":"iPhone 13", "platformName":"iOS", "orientation":"PORTRAIT"}]}' \
-H "Content-Type: application/json"

Change Device Timezone

TestingBot allows you to change the timezone of the mobile device (physical or emu/sim) to a timezone that you specify. Simply pass in a timeZone capability specifying a timezone from the list. You can find a list of timezones on Wikipedia.

Copy code
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/maestro/:id/run" \
-d '{ "capabilities":[{"version":"17.2", "deviceName":"iPhone 13", "platformName":"iOS", "timeZone":"Etc/UTC"}]}' \
-H "Content-Type: application/json"

Set Device Locale

You can pass the locale of the device to set regional and language options. The locale is a combination of language and country code, such as en_US for English (United States), or fr_CA for French (Canada).

Copy code
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/maestro/:id/run" \
-d '{ "capabilities":[{"version":"17.2", "deviceName":"iPhone 13", "platformName":"iOS", "locale":"de_DE"}]}' \
-H "Content-Type: application/json"
Locale Locale Code
Australia  en_AU
Belgium  nl_BE
Belgium  fr_BE
Brunei Darussalam ms_BN
Canada  en_CA
Canada fr_CA
Czech Republic  cs_CZ
Finland fi_FI
Germany  de_DE
Greece el_GR
Hungary hu_HU
India hi_IN
Indonesia id_ID
Israel he_IL
Italy it_IT
Japan ja_JP
Malaysia ms_MY
Netherlands  nl_NL
New Zealand   en_NZ
Norway nb_NO
Philippines  tl_PH
Poland pl_PL
PRC  zh_CN
Romania ro_RO
Russia ru_RU
Singapore en_SG
Slovakia sk_SK
Korea ko_KR
Sweden  sv_SE
Taiwan  zh_TW
Thailand  th_TH
Turkey  tr_TR
UK  en_GB
Ukraine  uk_UA
US es_US
USA en_US
Vietnam  vi_VN
Brazil pt-BR
China (Simplified) zh-Hans
China (Traditional) zh-Hant
Hong Kong zh-HK
India en-IN
Ireland en-IE
Latin America es-419
Mexico es-MX
South Africa en-ZA