From aafc3f58c9416971980c0becdfd487b7644c4b7e Mon Sep 17 00:00:00 2001 From: Marek Klus Date: Wed, 8 Feb 2017 09:52:32 +1100 Subject: [PATCH] XmlReporter: Trim test case name; added description and tags attributes to the test case element in the xml report. --- 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 df6eb07c..e1029a61 100644 --- a/include/reporters/catch_reporter_xml.hpp +++ b/include/reporters/catch_reporter_xml.hpp @@ -53,7 +53,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();