AWS Device Farm
Developer Guide (API Version 2015-06-23)

Environment Variables

Environment variables represent values that are used by your automated tests. You can use these environment variables in your YAML files and test code. In a custom test environment, Device Farm dynamically populates environment variable at test runtime.

Common Environment Variables

Android Tests

This section describes custom environment variables common to Android platform tests supported by Device Farm.

$DEVICEFARM_DEVICE_NAME

Name of the device on which your tests run. It represents the unique device identifer (UDID) of the device.

$DEVICEFARM_DEVICE_PLATFORM_NAME

The device platform name. It is either Android or iOS.

$DEVICEFARM_APP_PATH

The path to the mobile app on the host machine where the tests are being executed. The app path is available for mobile apps only.

$DEVICEFARM_DEVICE_UDID

The unique identifier of the mobile device running the automated test.

$DEVICEFARM_LOG_DIR

The path to the log files generated during the test run.

$DEVICEFARM_SCREENSHOT_PATH

The path to the screenshots, if any, captured during the test run.

$DEVICEFARM_CHROMEDRIVER_EXECUTABLE

The version of the Chrome browser.

iOS Tests

This section describes custom environment variables common to iOS platform tests supported by Device Farm.

$DEVICEFARM_DEVICE_NAME

Name of the device on which your tests run. It represents the unique device identifer (UDID) of the device.

$DEVICEFARM_DEVICE_PLATFORM_NAME

The device platform name. It is either Android or iOS.

$DEVICEFARM_APP_PATH

The path to the mobile app on the host machine where the tests are being executed. The app path is available for mobile apps only.

$DEVICEFARM_DEVICE_UDID

The unique identifier of the mobile device running the automated test.

$DEVICEFARM_LOG_DIR

The path to the log files generated during the test run.

$DEVICEFARM_SCREENSHOT_PATH

The path to the screenshots, if any, captured during the test run.