View a markdown version of this page

Hosts for custom test environments - AWS Device Farm

Hosts for custom test environments

Device Farm supports a set of operating systems with pre-configured software through the use of a test host environment. During test execution, Device Farm utilizes Amazon-managed instances (hosts) that dynamically connect to the selected device under test. This instance is fully cleaned up and not re-used between runs, and is terminated with its generated artifacts after the test run concludes.

Available test hosts for custom test environments

The test hosts are fully managed by Device Farm. The following table lists the currently available and supported Device Farm test hosts for custom test environments.

Device Platform Test Host Operating System Architecture(s) Supported Devices
Android amazon_linux_2 Amazon Linux 2 x86_64

Android 6 and above

iOS macos_tahoe

macOS Tahoe (version 26)

arm64

iOS 17 to 27

iOS macos_sequoia

macOS Sequoia (version 15)

arm64

iOS 15 to 26

Note

Periodically, Device Farm adds new test hosts for a device platform to support newer device OS versions and its dependencies. When this occurs, older test hosts for the respective device platform are subject to end of support.

Selecting a test host for custom test environments

To select your desired test host, specify the Android and iOS test host in the appropriate android_test_host and ios_test_host variables of your test spec file.

You can select a test host in one of the following ways:

  1. Select a specific host – You name the exact test host you want to use.

  2. Let Device Farm choose – You set the test host to default, and Device Farm picks the host based on the device's OS version.

  3. Use the fallback host – You omit the field, and Device Farm assigns a legacy test host as a fallback. This option is not recommended. For more information, see the Legacy iOS test host.

Managing test hosts is a shared responsibility between Device Farm and you. Your responsibilities vary depending on the selection type you choose. This is summarized in the following table for the recommended selection types.

Selection type Device Farm's responsibility Customer's responsibility

Select a specific host

Run your tests on the exact host you name, with a consistent set of software versions on every run.

Specify the host that provides the software versions your tests require (for example, macos_sequoia or amazon_linux_2). Update your test spec to a newer host for each major device OS version, because Device Farm ends support for older hosts over time.

Let Device Farm choose

Select a host that is compatible with the device's OS version, and route your tests on future OS versions to a supported host.

Set the test host value to default. If your tests require a specific software version, specify the host explicitly instead, because in rare cases an older version of a dependency might not be available on a newer host.

For more information about shared responsibility with AWS, see the Shared Responsibility Model on the AWS website.

Option 1: Select a specific host

When you create your test spec file, provide the exact test host value in the corresponding android_test_host or ios_test_host field.

Example
version: 0.1 android_test_host: amazon_linux_2 ios_test_host: macos_tahoe phases: # ...

Option 2: Let Device Farm choose

You can set the test host to the value default to have Device Farm select a host based on the OS version of the device under test.

Note

For the time being, default applies to ios_test_host only. Support for android_test_host is planned for a future release.

The following table shows the default host mapping by device OS version.

Platform Device OS version Assigned test host
iOS

17 to 27

macos_tahoe
iOS

15 to 16

macos_sequoia
Example
version: 0.1 ios_test_host: default phases: # ...

Operating system version

Each available test host uses a specific version of the operating system supported on Device Farm at the time. Device Farm periodically updates the operating system with minor version updates and security patches.

You can find the exact OS version used during your test run, including the minor version. To do this, add the following snippet to any phase of your test spec file:

Example
phases: install: commands: # The following example prints the instance's operating system version details - |- if [[ "Darwin" == "$(uname)" ]]; then echo "$(sw_vers --productName) $(sw_vers --productVersion) ($(sw_vers --buildVersion))"; else echo "$(. /etc/os-release && echo $PRETTY_NAME) ($(uname -r))"; fi