Boost C++ Libraries: Ticket #13398: Log format JUNIT generates invalid XML files https://svn.boost.org/trac10/ticket/13398 <p> The generated XML attributes 'property' are not closed in JUNIT log output (see <a href="http://www.boost.org/doc/libs/1_66_0/libs/test/doc/html/boost_test/test_output/log_formats.html">http://www.boost.org/doc/libs/1_66_0/libs/test/doc/html/boost_test/test_output/log_formats.html</a>). </p> <p> Example output with log format JUNIT: </p> <pre class="wiki">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;testsuite tests="0" skipped="0" errors="1" failures="2" id="0" name="Master_Test_Suite" time="44.222"&gt; &lt;properties&gt; &lt;property name="platform" value="Win32" &lt;property name="compiler" value="Microsoft Visual C++ version 12.0" &lt;property name="stl" value="Dinkumware standard library version 610" &lt;property name="boost" value="1.66.0" &lt;/properties&gt; </pre><p> Look at 'bool test_suite_start( test_suite const&amp; ts )' in 'boost/test/impl/junit_log_formatter.ipp'. There are no closing tags. </p> <pre class="wiki">if(m_display_build_info) { m_stream &lt;&lt; "&lt;properties&gt;" &lt;&lt; std::endl; m_stream &lt;&lt; "&lt;property name=\"platform\" value" &lt;&lt; utils::attr_value() &lt;&lt; BOOST_PLATFORM &lt;&lt; std::endl; m_stream &lt;&lt; "&lt;property name=\"compiler\" value" &lt;&lt; utils::attr_value() &lt;&lt; BOOST_COMPILER &lt;&lt; std::endl; m_stream &lt;&lt; "&lt;property name=\"stl\" value" &lt;&lt; utils::attr_value() &lt;&lt; BOOST_STDLIB &lt;&lt; std::endl; std::ostringstream o; o &lt;&lt; BOOST_VERSION/100000 &lt;&lt; "." &lt;&lt; BOOST_VERSION/100 % 1000 &lt;&lt; "." &lt;&lt; BOOST_VERSION % 100; m_stream &lt;&lt; "&lt;property name=\"boost\" value" &lt;&lt; utils::attr_value() &lt;&lt; o.str() &lt;&lt; std::endl; m_stream &lt;&lt; "&lt;/properties&gt;" &lt;&lt; std::endl; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13398 Trac 1.4.3 Raffi Enficiaud Wed, 17 Jan 2018 19:49:51 GMT owner, status, milestone changed https://svn.boost.org/trac10/ticket/13398#comment:1 https://svn.boost.org/trac10/ticket/13398#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Gennadiy Rozental</span> to <span class="trac-author">Raffi Enficiaud</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.67.0</span> </li> </ul> Ticket Andreas Gallien <gallien@…> Thu, 18 Jan 2018 12:16:55 GMT cc set https://svn.boost.org/trac10/ticket/13398#comment:2 https://svn.boost.org/trac10/ticket/13398#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">gallien@…</span> added </li> </ul> Ticket Raffi Enficiaud Thu, 18 Jan 2018 14:14:55 GMT <link>https://svn.boost.org/trac10/ticket/13398#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13398#comment:3</guid> <description> <p> Is this only when you are including the build info to the output, or is there any other missing tag? </p> </description> <category>Ticket</category> </item> <item> <author>Andreas Gallien <gallien@…></author> <pubDate>Fri, 19 Jan 2018 16:33:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13398#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13398#comment:4</guid> <description> <p> I don't see any other problems in the XML structure. </p> <p> Currently we are using a workaround with 'sed' to add the missing closing tags to the log: </p> <p> sed -i -e "s/<sup>\(&lt;property.*\)/\1\/&gt;/" <a class="missing wiki">TestLog</a>.xml </sup></p> <p> Then the generated XML could be read by our test reporting tool. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Wed, 14 Feb 2018 09:38:31 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/13398#comment:5 https://svn.boost.org/trac10/ticket/13398#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> In master. </p> Ticket