catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Add OverallResultsCases element to XML reporter
- Commit
ee4538c0c68196a51c047ae6ed64672606f4f208- Author
- Ryan Pavlik ·
- Committer
- Martin Hořeňovský
- Parents
dc7a20fc7410
Changes
include/reporters/catch_reporter_xml.cpp | 8 ++++++++ projects/SelfTest/Baselines/xml.sw.approved.txt | 2 ++ 2 files changed, 10 insertions(+) diff --git a/include/reporters/catch_reporter_xml.cpp b/include/reporters/catch_reporter_xml.cpp index 0fb78be0..b58becd8 100644 --- a/include/reporters/catch_reporter_xml.cpp +++ b/include/reporters/catch_reporter_xml.cpp @@ -207,6 +207,10 @@ namespace Catch { .writeAttribute( "successes", testGroupStats.totals.assertions.passed ) .writeAttribute( "failures", testGroupStats.totals.assertions.failed ) .writeAttribute( "expectedFailures", testGroupStats.totals.assertions.failedButOk ); + m_xml.scopedElement( "OverallResultsCases") + .writeAttribute( "successes", testGroupStats.totals.testCases.passed ) + .writeAttribute( "failures", testGroupStats.totals.testCases.failed ) + .writeAttribute( "expectedFailures", testGroupStats.totals.testCases.failedButOk ); m_xml.endElement(); } @@ -216,6 +220,10 @@ namespace Catch { .writeAttribute( "successes", testRunStats.totals.assertions.passed ) .writeAttribute( "failures", testRunStats.totals.assertions.failed ) .writeAttribute( "expectedFailures", testRunStats.totals.assertions.failedButOk ); + m_xml.scopedElement( "OverallResultsCases") + .writeAttribute( "successes", testRunStats.totals.testCases.passed ) + .writeAttribute( "failures", testRunStats.totals.testCases.failed ) + .writeAttribute( "expectedFailures", testRunStats.totals.testCases.failedButOk ); m_xml.endElement(); } diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index 784413d0..d10412bf 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -16376,6 +16376,8 @@ loose text artifact <OverallResult success="true"/> </TestCase> <OverallResults successes="1564" failures="149" expectedFailures="21"/> + <OverallResultsCases successes="226" failures="86" expectedFailures="4"/> </Group> <OverallResults successes="1564" failures="148" expectedFailures="21"/> + <OverallResultsCases successes="226" failures="86" expectedFailures="4"/> </Catch>