gradle-plugins/gradle/test/junit5.gradle

28 lines
875 B
Groovy
Raw Normal View History

2021-11-09 14:08:25 +01:00
dependencies {
2023-10-23 16:58:25 +02:00
testImplementation testLibs.junit.jupiter.api
testImplementation testLibs.junit.jupiter.params
testImplementation testLibs.hamcrest
testRuntimeOnly testLibs.junit.jupiter.engine
testRuntimeOnly testLibs.junit.jupiter.vintage
testRuntimeOnly testLibs.junit.jupiter.platform.launcher
2021-11-09 14:08:25 +01:00
}
test {
useJUnitPlatform()
failFast = true
testLogging {
events 'STARTED', 'PASSED', 'FAILED', 'SKIPPED'
showStandardStreams = true
2021-11-09 14:08:25 +01:00
}
afterSuite { desc, result ->
if (!desc.parent) {
println "\nTest result: ${result.resultType}"
println "Test summary: ${result.testCount} tests, " +
"${result.successfulTestCount} succeeded, " +
"${result.failedTestCount} failed, " +
"${result.skippedTestCount} skipped"
}
}
}