(Gradle 3.2.1) I run some java tests, which logs output in Stderr/Stdout. I can see that output, if I start
gradle test --info
but in that
Add these lines to build.gradle :
apply plugin: 'java'
test {
dependsOn cleanTest
testLogging.showStandardStreams = true
}
Notice: dependsOn cleanTest is not necessary but if not used, you need to run cleanTest or clean task before test task.
A better approach:
apply plugin: 'java'
test {
testLogging {
outputs.upToDateWhen {false}
showStandardStreams = true
}
}
Notice: outputs.upToDateWhen {false} is not necessary but if not used, you need to run cleanTest or clean task before test task.
For more info and options see the documentation.