paperwork
paperwork copied to clipboard
Add console logging to integration tests
This works for unit tests, but has no effect on instrumentation tests:
testOptions.unitTests.all {
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
outputs.upToDateWhen { false }
showStandardStreams = true
exceptionFormat "full"
}
}
This should do the job:
tasks.withType(com.android.build.gradle.internal.tasks.AndroidTestTask) { task ->
task.doFirst {
logging.level = LogLevel.INFO
}
task.doLast {
logging.level = LogLevel.LIFECYCLE
}
}
Except it doesn't. It seems to have zero effect on instrumentation tests, still only failures are logged.
When run with the --info switch, the passed tests are there, so the above should be working, too. What's wrong here? Anyone knows how to solve this?
@zsoltk The first one is for unit tests and works fine. The second does not work at all.