Skip to content

Instantly share code, notes, and snippets.

@daltonjorge
Forked from orip/build.gradle
Created April 22, 2019 13:31
Show Gist options
  • Save daltonjorge/4c5da848111f7c37d5f89eb66145bdb4 to your computer and use it in GitHub Desktop.
Save daltonjorge/4c5da848111f7c37d5f89eb66145bdb4 to your computer and use it in GitHub Desktop.
Print Gradle test results to console
/*
Sample output:
> gradle test ruby-1.9.3-p194 testing_with_gradle 9179829 ✗
...
:test
Results: SUCCESS (84 tests, 74 successes, 0 failures, 10 skipped)
*/
test {
testLogging {
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
println "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment