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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
I want to know how to get output in Xml.
Pls tell me, if any body have used it.
Thanks & Regards
- Ritesh
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.