As explained in other threads Gradle can be configured to log test results into the console:
- Gradle Android: How to Display test results without using --info
- Gradle: How to Display Test Results in the Console in Real Time?
- Output unit testing results on console using spock junit testing and gradle build system
Basically, this can be setup through the following task:
tasks.withType(Test) {
testLogging {
// Custom configuration
}
}
This works fine for unit tests and looks somewhat like this:
...
:app:assembleDebugUnitTest
:app:testDebugUnitTest
:app:processDebugResources
com.example.StringsTest > formatValue PASSED
com.example.StringsTest > formatValueWithDecimals FAILED
1 test completed, 1 failed
Besides, unit tests I also run integration test using the following command:
$ ./gradlew connectedAndroidTest
When I look at the output in the console I am missing the individual test results as being written for unit tests. How can I configure test logging for instrumentation tests?