Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3636 closed Feature Requests (fixed)

make XML output of test report XML-compliant

Reported by: Ákos Maróy <akos@…> Owned by: Gennadiy Rozental
Milestone: Boost 1.41.0 Component: test
Version: Boost 1.40.0 Severity: Cosmetic
Keywords: Cc: akos@…

Description

I have a suggestion for the XML output generated by the boost unit test framework: currently, if tests fail, the message detailing the failure of the test is put in verbatim as a test element into the XML output. This can be problematic, if the output contains XML-like structures, like text that looks like an XML element, or invalid characters.

thus, I'd suggest enclosing such output in a CDATA section, that would ensure that the generated XML file is indeed always well formed XML. see more here: http://www.w3.org/TR/REC-xml/#sec-cdata-sect - but basically this would mean printing the failures like this:

<![CDATA[   reason of the failure...   ]]>

Change History (2)

comment:1 by Gennadiy Rozental, 13 years ago

Resolution: fixed
Status: newclosed

(In [57854]) Use CData to print error message. Fixes #3636

comment:2 by Ákos Maróy <akos@…>, 13 years ago

excellent - thank you!

Note: See TracTickets for help on using tickets.