Skip to content

Commit

Permalink
Add OverallResultsCases element to XML reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
rpavlik authored and horenmar committed Jun 28, 2020
1 parent dc7a20f commit ee4538c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/reporters/catch_reporter_xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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();
}

Expand Down
2 changes: 2 additions & 0 deletions projects/SelfTest/Baselines/xml.sw.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit ee4538c

Please sign in to comment.