Continuous Testing with Android Emulator Containers

Michael Hazard
Android Developers
Published in
2 min readSep 18, 2020

--

Setting up and running the Android Emulator on continuous integration (CI) or deployment (CD) is now easier than ever before with our pre-built Android Emulator Containers. These containers allow you to find and run the right version of the Emulator without the headache of dependency management, which makes it easy to scale automated tests as part of a CI/CD system without the upkeep cost of a physical device farm.

Earlier this year, we released Android Emulator download and Docker image generator scripts to help developers deploy and debug remote emulators. These scripts made it easier to find the right system image, manage system dependencies, and run the Android Emulator.

We are now taking this one step further and experimentally providing pre-built Android Emulator Containers for each major Emulator release. These containers remove the need to manually run the generator yourself, saving time and complexity. Don’t worry, the pre-built containers still support all of the features offered by those built with the Docker scripts, like adb and web access.

Linux KVM is required to run these containers and can be enabled by running on bare metal or on a virtual machine with nested virtualization. The correct option depends on your cloud provider, so read our documentation for recommendations.

The script below is an illustration of how you can integrate an Android Emulator Container into your system and use it to run tests.

Sample script to pull, run, and port forward an Android Emulator Container

Check out our general README for further information on getting started and taking advantage of the Android Emulator Containers. This is our first time offering pre-built Emulator Containers, so please report any problems or feature requests on our issue tracker.

--

--