Skip to content

Instantly share code, notes, and snippets.

@matklad
Last active December 1, 2016 10:17
Show Gist options
  • Save matklad/87c5fe226e22310ea0405ed96b72fbee to your computer and use it in GitHub Desktop.
Save matklad/87c5fe226e22310ea0405ed96b72fbee to your computer and use it in GitHub Desktop.
Laconic test output for gradle
test {
testLogging {
events 'skipped', 'failed'
exceptionFormat = 'full'
}
beforeSuite { suite ->
if (suite.className != null) {
println()
println(suite.className)
}
}
afterTest { desc, result ->
def c = '.'
if (result.resultType == TestResult.ResultType.FAILURE) {
c = 'X'
} else if (result.resultType == TestResult.ResultType.SKIPPED) {
c = 'S'
}
print(c)
System.out.flush()
}
afterSuite { println() }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment