Upgrading to the latest Android test host
For the full list of available test hosts and how to select one, see Hosts for custom test environments.
Device Farm periodically adds a new Android test host to support newer Android versions and
software, and ends support for older test hosts over time. You select the test host with the
android_test_host field of your test spec file. To upgrade, set the field to the
new test host and review the differences listed for that upgrade.
To avoid updating the field each time Device Farm adds a test host, set
android_test_host: default instead. Device Farm then selects a test host that is
compatible with the Android version of the device under test, and routes tests on future
Android versions to a supported test host. If your tests require a specific software version,
we recommend that you select the test host explicitly, because a newer test host might not
offer an older version.
With either selection type, select software versions explicitly with devicefarm-cli so
that a change in default versions doesn't affect your tests. For the mapping of Android
versions to test hosts, see Let Device Farm
choose.
Upgrading from Amazon Linux 2 to Amazon Linux 2023
To upgrade existing Android tests from the amazon_linux_2 (Amazon Linux 2) test
host to the recommended amazon_linux_2023 (Amazon Linux 2023) test host, set
android_test_host: amazon_linux_2023 in your test spec file. The upgrade changes
the following:
-
Supported devices – Each test host supports a different range of Android versions. For the devices that each test host supports, see Available test hosts for custom test environments.
-
App re-signing – By default, Device Farm installs your Android app and test package as you uploaded them, instead of re-signing them. For more information, see Re-signing apps.
-
VPC endpoint connectivity – The
amazon_linux_2023test host doesn't support VPC endpoint (VPCE) connectivity. If your tests reach private resources through VPCE, switch to VPC-ENI before you change test hosts. For more information, see VPC-ENI in AWS Device Farm. -
ADB – The
amazon_linux_2023test host provides a newer release of the Android SDK Platform-Tools, withadbversion 1.0.41. Theamazon_linux_2test host providesadbversion 1.0.39. To print theadbversion that your test run uses, addadb versionto a phase of your test spec file. If your tests depend on the behavior of a specificadbversion, verify them on theamazon_linux_2023test host. -
Selectable software – The
amazon_linux_2023test host offers newer versions of Java, Node.js, and Python, but not every older version that theamazon_linux_2test host offers, such as Appium 1. For the versions on each test host, see Supported software within custom test environments.
For more information about Amazon Linux 2023, see What is Amazon Linux 2023? and Comparing AL2 and AL2023 in the Amazon Linux 2023 User Guide.