2

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?

reutsey
  • 1,743
  • 1
  • 17
  • 36

1 Answers1

5

You can use the --enable-display switch:

./gradlew pixel4api30DebugAndroidTest --enable-display

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

Tidder
  • 1,126
  • 1
  • 7
  • 15
  • Sawweetttt....THANK YOU!! – reutsey Feb 15 '23 at 19:14
  • how did you know that was a possible option to use? Is there a list of options somewhere that I can reference? – reutsey Feb 15 '23 at 21:48
  • 2
    Seem like Google does not provide much information (as always). Found it in the gradle package `com.android.build.gradle.internal.tasks.ManagedDeviceInstrumentationTestTask` @Option( option="enable-display", description = "Adding this option will display the emulator while testing, instead" + "of running the tests on a headless emulator.") fun setDisplayEmulatorOption(value: Boolean) = enableEmulatorDisplay.set(value)` – Tidder Feb 16 '23 at 06:46