Gradle Tip: Seeing Standard Streams During Tests
Tuesday, September 10, 2013 |I’m not a real big fan of using standard out as a debugging strategy (I prefer an IDE and break points, for what it’s worth), but there are times when it’s either necessary or just convenient. The standard Gradle configuration, though, makes this a bit more difficult than it probably should be. Fortunately, Gradle also makes it easy to change:
1
2
3
test {
testLogging.showStandardStreams = true
}
If you’d like to make this change globally, that’s also easy:
1
2
3
4
5
allprojects {
tasks.withType(Test) {
testLogging.showStandardStreams = true
}
}