Show android emulators when running tests via gradle managed devices

601 Views Asked by At

When running android espresso tests via gradle managed devices, i.e. by running:

./gradlew pixel4api30DebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aaa.bbb.ccc.Suites.TestSuite -Pandroid.experimental.androidTest.numManagedDeviceShards=3

Is it possible to have it display the emulators while running the tests so that you are able to see what is happening?

1

There are 1 best solutions below

3
On BEST ANSWER

You can use the --enable-display switch:

./gradlew pixel4api30DebugAndroidTest --enable-display

But keep in mind that this will not work with ATD images.