mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 14:42:37 +01:00
Improve apitest cmd line console logging
- Show full stack traces in console - Do use previously cached test outputs - Do not show skipped test name in console (too noisy) - Show test run summary, including number of skipped tests - Show note about skipped test info in the html report - Show link to html report on test SUCCESS
This commit is contained in:
parent
8e51e1e495
commit
d6524bf46d
1 changed files with 24 additions and 1 deletions
25
build.gradle
25
build.gradle
|
@ -627,8 +627,31 @@ configure(project(':apitest')) {
|
|||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
outputs.upToDateWhen { false } // Don't use previously cached test outputs.
|
||||
testLogging {
|
||||
events "passed", "skipped", "failed"
|
||||
showStackTraces = true // Show full stack traces in the console.
|
||||
exceptionFormat = "full"
|
||||
// Show passed & failed tests, and anything printed to stderr by the tests in the console.
|
||||
// Do not show skipped tests in the console; they are shown in the html report.
|
||||
events "passed", "failed", "standardError"
|
||||
}
|
||||
|
||||
afterSuite { desc, result ->
|
||||
if (!desc.parent) {
|
||||
println("${result.resultType} " +
|
||||
"[${result.testCount} tests, " +
|
||||
"${result.successfulTestCount} passed, " +
|
||||
"${result.failedTestCount} failed, " +
|
||||
"${result.skippedTestCount} skipped] html report contains skipped test info")
|
||||
|
||||
// Show report link if all tests passed in case you want to see more detail, stdout, skipped, etc.
|
||||
if(result.resultType == TestResult.ResultType.SUCCESS) {
|
||||
DirectoryReport htmlReport = getReports().getHtml()
|
||||
String reportUrl = new org.gradle.internal.logging.ConsoleRenderer()
|
||||
.asClickableFileUrl(htmlReport.getEntryPoint())
|
||||
println("REPORT " + reportUrl)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue