Menu

How to get output in XML

Help
ritesh
2003-01-08
2003-09-15
  • ritesh

    ritesh - 2003-01-08

    Hi
        I want to know how to get output in Xml.
    Pls tell me, if any body have used it.

    Thanks & Regards

    - Ritesh

     
    • Nikhil Satankar

      Nikhil Satankar - 2003-09-15

      Hello Ritesh,
                TestRunner class provides a setOutputter method .
      //Code
      ---------------------------
      CppUnit::TextUi::TestRunner runner;
      std::fstream outputFile( (char *)strTestRptFilePath.c_str(), std::ios::out);
      CppUnit::XmlOutputter *pxmlResult = new CppUnit::XmlOutputter(&runner.result(), outputFile);
      //Setting the Out put Result to Xml data file.
      runner.setOutputter(pxmlResult);
      runner.run();
      -----------------
      In case of MFC  based application the TestRunner header does not provide the SetOutputter method .  I don't know how to have an Xml o/p in case of MFC .Let me know if you come to know.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.