junit reporter reports random seed (--rng-seed)

Fixes #1520
This commit is contained in:
Nathaniel Dosé
2019-01-31 22:03:41 +01:00
committed by Jozef Grajciar
parent d75e9b3c0f
commit 17686ba571
2 changed files with 12 additions and 2 deletions

View File

@@ -76,6 +76,13 @@ namespace Catch {
void JunitReporter::testRunStarting( TestRunInfo const& runInfo ) {
CumulativeReporterBase::testRunStarting( runInfo );
xml.startElement( "testsuites" );
if( m_config->rngSeed() != 0 ) {
xml.startElement( "properties" );
xml.scopedElement( "property" )
.writeAttribute( "name", "random-seed" )
.writeAttribute( "value", m_config->rngSeed() );
xml.endElement();
}
}
void JunitReporter::testGroupStarting( GroupInfo const& groupInfo ) {