I have answered this before, but I cannot find the link to the answer right now.
Here is the Android gradle plugin:
android {
testOptions.unitTests.all {
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
}
}
}
, gradle:
tasks.withType(Test) {
testLogging {
exceptionFormat 'full'
showCauses true
showExceptions true
showStackTraces true
showStandardStreams true
}
}