gradlew testDebugUnitTest mergeAndroidReports

Viewed 1473

It's of my understanding that for running only the unit tests following is used:

gradlew testDebugUnitTest

This also works and report gets generated, but if I write following:

gradlew testDebugUnitTest mergeAndroidReports

I get:

Execution failed for task ':app:connectedDebugAndroidTest'.
> com.android.builder.testing.api.DeviceException: No connected devices!

So it's trying to also run the instrumentation tests, is this supposed to be expected or is this a bug?

Seen on Android Studio 4 Canary 9 with latest gradle version (4.0.0-alpha09).

mergeAndroidReports

1 Answers

mergeAndroidReports appears to only merge the test reports generated by the instrumentation androidTest tests, which is why the task depends on connectedAndroidTest.

Related