mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-01 14:39:13 -06:00
Better unit test output
This commit is contained in:
parent
fc633160ee
commit
b06c69136f
1 changed files with 15 additions and 1 deletions
|
|
@ -46,6 +46,20 @@ test {
|
|||
useJUnitPlatform()
|
||||
dependsOn cleanTest
|
||||
testLogging.showStandardStreams = true
|
||||
testLogging {
|
||||
events "passed", "skipped", "failed"
|
||||
info.events = debug.events
|
||||
info.exceptionFormat = debug.exceptionFormat
|
||||
|
||||
afterSuite { desc, result ->
|
||||
if (!desc.parent) { // will match the outermost suite
|
||||
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} passed, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped)"
|
||||
def startItem = '| ', endItem = ' |'
|
||||
def repeatLength = startItem.length() + output.length() + endItem.length()
|
||||
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*sourceSets {
|
||||
|
|
@ -58,4 +72,4 @@ jar {
|
|||
attributes 'Main-Class': 'rs09.Server'
|
||||
}
|
||||
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue