How to start the Android Emulator from the terminal command line. It‘s helpful if you want to automate Android testing on an emulator locally on your Mac machine. Add below commands to a shell script and then just run your Android Espresso tests.

Script starts emulator, runs gradle command $gradle cAT, then shuts down emulator.

Start Android emulator:

  1. Go to your Android sdk directory (ex: open terminal and $cd Users/engineering/Library/Android/sdk/tools/emulator) and enter below command:

The Android Emulator starts running on your computer. Add below command; waits for Android emulator to finish booting:

Run Espresso test suite on a connected Android emulator:

Kill Android emulator:

To-do
Add images of emulator.

Add command to run espresso test with no screen emulator.

software engineer, read, swim, travel. apps: https://goo.gl/rDuuQw https://goo.gl/15GvfE

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store