
I am using the CVS head of Boost.Test up to date this morning and producing the log output in XML format. I find that the resulting file is not not well-formed XML according to Firefox and Saxon. There are two issues: there are angle brackets in the attribute values and a single file contains two node trees. The first issue is indirectly caused by using the BOOST_FUNC_TEMPLATE_TEST_CASE macro. The log output then becomes: <TestLog><TestSuite name="Shared/Pulse"><TestCase name="ShortPulses<Imaging::AirSamplePeakFind_c>">... Where "ShortPulses" is the templated test function and "Imaging::AirSamplePeakFind_c" is the name of the type. The angle brackets in attribute valule is not allowed. The second issue is that the output stream contains the <TestLog> node tree which is then followed by the <TestResult> tree so the XML document has two top level nodes. Previously the TestLog output used to go to stdout and TestResult went to stderr (I believe), meaning that I could capture them to different files, or redirect the TestLog ouptut and leave TestResult on the terminal if I wanted to. I'm not sure what the solution is if it's preferred not to send TestResult to stderr. Perhaps the XML document needs a higher level node such as <Boost.Test> that contains <TestLog> and <TestResult>. I notice also that the XML stream is all on one line, wc under cygwin reports zero lines and a line length of 38438 in my case. This is perfectly readable by browsers and Saxon however not by standard text editors. Would it be possible to put some line breaks in so that the file could be more easily viewed in text editors? For reference I am running my test program as:
./TestPulse.exe --log_level=ALL --output_format=XML > TestResult.xml Using cygwin under Windows. The test harness is compiled using Borland BCB6.
Richard