Include suite name in junit classname attrib for grouping in jenkins

Jenkins groups junit test results by loosely interpreting the
classname attribute of the <testcase> element as a package-qualified
java class name such as java.util.String. It ignores the <testsuite>
elements in the xml. To organize test results we therefore need to
embed the suite name in the classname attribute as if it was a java
package name.

Fixes #922.
This commit is contained in:
Thomas Sondergaard 2017-05-30 21:40:28 +02:00
parent a6b03031ba
commit 69ff7fcf42

View File

@ -150,6 +150,10 @@ namespace Catch {
if ( className.empty() )
className = "global";
}
if ( !m_config->name().empty() )
className = m_config->name() + "." + className;
writeSection( className, "", rootSection );
}