I compile the following minimal C++ Boost test program
and run the test using the parameters
The XML output is in the attached file xunit_test_good.xml and the xUnit plugin generated JUnit output is in the attached file junit_good.xml. Everything is as I would expect here and the table that is rendered on the Jenkins GUI has ExampleTestSuite at the top level with MyTestSuite_1 and MyTestSuite_2 nested below it.
However, if I comment in the BOOST_TEST_MESSAGE line in the code, I get the message in the XML output as in the attached file xunit_test_bad.xml. This gets converted to the JUnit output in junit_test_bad.xml by the xUnit plugin. The nesting is now messed up in that ExampleTestSuite appears with a nested MyTestSuite_2 but ExampleTestSuite.MyTestSuite_1 appears alongside ExampleTestSuite.
This is coming from the classname attribute in the generated JUnit output. Would it be possible to fix this so that test message output does not interfere with the generation of the classname attribute and hence the nesting of the test suites in the report? Alternatively, is there a workaround that I can apply to keep the log message but still have the expected nesting of the test suites?