I'm using specs2/scala for unit tests and using gradle to build. By default the unit-test output goes to a html file. I would like to have the output go directly to stdout (just like sbt).
Anyone know the magic incantation?
thanks wing
You can use
test {
//makes the standard streams (err and out) visible at console when running tests
testLogging.showStandardStreams = true
}
But this logs stdout at the info level so you need to run gradle -i to see it (it seems this will be fixed in 1.1: http://issues.gradle.org/browse/GRADLE-1966)
Alternatively, you can add an event handler:
test {
onOutput { descriptor, event ->
logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message )
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With