From 5d1474c862a4204f08f7ecfaf12dea3827996579 Mon Sep 17 00:00:00 2001 From: Henry Roeland Date: Thu, 27 Jun 2024 15:32:41 +0200 Subject: [PATCH] Fix issue #5 show proper error(s) and failure(s) count per testsuite. --- lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 5c43c8b..b2fbf7c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -137,7 +137,7 @@ JunitFullReporter = function (newman, reporterOptions, options) { var result; if (property !== 'assertions') { // Error - ++errors; + testsuite.att('errors', ++errors); result = testcase.ele('error'); if (errorItem.stacktrace) { @@ -145,7 +145,7 @@ JunitFullReporter = function (newman, reporterOptions, options) { } } else { // Failure - ++failures; + testsuite.att('failures', ++failures); result = testcase.ele('failure'); result.dat(errorItem.stack); }