Coming Up for Air

Gradle Tip: Seeing Standard Streams During Tests

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:

test {
    testLogging.showStandardStreams = true

If you’d like to make this change globally, that’s also easy:

allprojects {
    tasks.withType(Test) {
        testLogging.showStandardStreams = true
tags: Gradle


Sample quote

Quote source