Menu

Regarding setting out to Xml in MFC based app

Help
2003-08-27
2004-08-24
  • Nikhil Satankar

    Nikhil Satankar - 2003-08-27

    Hello everybody,
           CppUnit provides seperate  TestRunner.h header for mfc and text . In case of MFC  we  can not set the out put as Xml . Has any body  tried to make changes to cppUnit frame work to have out put as XML. or any work around ????

     
    • Chalapathi Kotnana

          // Create the event manager and test controller
          CPPUNIT_NS::TestResult controller;

          // Add a listener that colllects test result
          CPPUNIT_NS::TestResultCollector result;
          controller.addListener( &result );       

          CppUnit::TestRunner runner;
              runner.addTest(XXX_TEST::suite());

             runner.run(controller,"");

          std::ofstream file( "results.xml" );
          CPPUNIT_NS::XmlOutputter xml( &result, file );
          //xml.setStyleSheet( "report.xsl" );
          xml.write();
          file.close();

       
    • Anonymous

      Anonymous - 2004-08-24

      This code is not working for me. Please can anyone help me? I need to generate a XML output in my MFC based app but don't know how.

      thanks in advance.

       

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.