diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestConsoleHandler.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestConsoleHandler.java index 1b247acd40a43..79bd24ad4bf80 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestConsoleHandler.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestConsoleHandler.java @@ -166,12 +166,8 @@ public void runComplete(TestRunResults results) { + " were skipped. Tests took " + (results.getTotalTime()) + "ms." + "\u001b[0m"; } else { - StringBuilder sb = new StringBuilder( - "\u001B[91mTest run failed, " + methodCount.get() + " tests were run, " - + results.getCurrentFailing().size() - + " failed, " - + skipped.get() - + " were skipped. Tests took " + results.getTotalTime() + "ms"); + int failedTestsNum = results.getCurrentFailing().size(); + boolean hasFailingTests = failedTestsNum > 0; for (Map.Entry classEntry : results.getCurrentFailing().entrySet()) { for (TestResult test : classEntry.getValue().getFailing()) { log.error( @@ -179,7 +175,12 @@ public void runComplete(TestRunResults results) { test.getTestExecutionResult().getThrowable().get()); } } - lastStatus = sb.toString() + "\u001b[0m"; + String output = String.format("Test run failed, %d tests were run, ", methodCount.get()) + + String.format("%s%d failed%s, ", + hasFailingTests ? "\u001B[1m" : "", failedTestsNum, + hasFailingTests ? "\u001B[2m" : "") + + String.format("%d were skipped. Tests took %dms", skipped.get(), results.getTotalTime()); + lastStatus = "\u001B[91m" + output + "\u001b[0m"; } //this will re-print when using the basic console promptHandler.setPrompt(RUNNING_PROMPT);