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
XmlReporter: Trim test case name; added description and tags attributes to the test case element in the xml report.
- Commit
ab199d9cf9359540a1294d1b9a40dc48469f0428- Author
- Marek Klus ·
- Committer
- Phil Nash
- Parents
97d8003a7131
Changes
include/reporters/catch_reporter_xml.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/reporters/catch_reporter_xml.hpp b/include/reporters/catch_reporter_xml.hpp index eb23224b..00baff93 100644 --- a/include/reporters/catch_reporter_xml.hpp +++ b/include/reporters/catch_reporter_xml.hpp @@ -60,7 +60,10 @@ namespace Catch { virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE { StreamingReporterBase::testCaseStarting(testInfo); - m_xml.startElement( "TestCase" ).writeAttribute( "name", testInfo.name ); + m_xml.startElement( "TestCase" ) + .writeAttribute( "name", trim( testInfo.name ) ) + .writeAttribute( "description", testInfo.description ) + .writeAttribute( "tags", testInfo.tagsAsString ); if ( m_config->showDurations() == ShowDurations::Always ) m_testCaseTimer.start();