XML Output problem
In the CUTE Plug-in User Manual on page 9-10 it talks about XML output and includes a nice formatted picture of the output. However, when I try to use the xml output like so, my output looks nothing akin to that picture.
cute::xml_file_opener xmlfile(argc, argv);
cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out);
cute::makeRunner(lis, argc, argv)(s, "AllTests");
I have played around with the xml_listener.h but I cannot figure out how this was done. The brief paragraph in the Plug-in User Manual is of no real help either. Is this a custom designed aspect to the xml file, css or something that I am missing inside CUTE.
Any help with this question would be greatly appreciated in my journey to learn how to unit test C++ code.
RE: XML Output problem - Added by Thomas Corbat almost 4 years ago
The generated .xml file is actually just plain XML - nothing to really look at. The screenshot you mention refers to the last sentence of the XML Output paragraph. It is the test result view of the Hudson build server. It actually parses this file and generates a nice, navigateable view.
The CUTE plug-in does not yet provide any means for creating a webpage or any other kind of output rendering directly - except for the test result view in Eclipse.
If you want to generate HTML output from the test result you can use ANT and the
JUnitReport task, which facilitates Xalan. Or you could use Xalan directly. When using
JUnitReport you need to adapt the
JUnitReport expects several .xml files instead of one. It then assembles a new suites file from those separate files, which CUTE actually already does. Therefore, using Xalan directly might be easier.
Nevertheless, I'd suggest you use a build server like Hudson anyway.
I hope this helps.