When I execute Android tests on the command-line using Gradle, I would like to see test log output. I followed the suggestion in this post but events are not being logged.
My app/build.gradle:
apply plugin: 'com.android.application'
...
//Test Logging
tasks.withType(Test) {
testLogging {
events "started", "passed", "skipped", "failed"
}
}
My project has multiple product flavors (free, paid) and build types (debug, release). I expected this would configure these tasks for test logging:
connectedAndroidTestPaidDebug
connectedAndroidTestFreeDebug
connectedAndroidTestPaidRelease
...
In Android Studio, I see warnings:
Cannot resolve symbol 'testLogging'
Cannot resolve symbol 'events'