From a2d099bfd92d46dadc8200829b5ea0989b777977 Mon Sep 17 00:00:00 2001 From: Jeanderson Barros Candido Date: Wed, 23 May 2018 08:30:31 -0300 Subject: [PATCH] Implemented log summary and updated log configurations (#54) (#55) --- build.gradle | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/build.gradle b/build.gradle index a213a1d..2f9b7f3 100644 --- a/build.gradle +++ b/build.gradle @@ -58,6 +58,23 @@ test { def ignoredPath = "**/" + failedTestClass.replace(".", "/") + ".class" exclude ignoredPath } + + testLogging { + events "passed", "skipped", "failed" + } + + afterSuite { testDescriptor, result -> + if (!testDescriptor.parent) { + println "Test Execution: ${result.resultType}" + + def summaryFields = ["${result.testCount} tests", + "${result.successfulTestCount} passed", + "${result.failedTestCount} failed", + "${result.skippedTestCount} skipped"] + + println "Summary: " + summaryFields.join(", ") + } + } } task compile { -- 2.34.1