When CppUnit tests are run, there are dots in the output of the xml or the text file.
freopen("UnitTest-Results.xml", "a", stdout);
CppUnit::TextUi::TestRunner runner;
runner.addTest(pSuite);
// Change the default outputter to a Text Outputter.
runner.setOutputter(new CppUnit::XmlOutputter(&runner.result(), std::cout));
The output is:
.........................
OK (25 tests)
How do I choose not to print the dots in the output file ?
Thanks
Depending on how you call run you can specify the right parameter to skip the output.
The method signature is:
with
doPrintResult = falseanddoPrintProgress = falseyou can suppress all output.The other way is to use TestRunner or your own subclass of it. This is also not that difficult and it just depends on the structure of your tests which one is easier to implement.
P.S. Just to make it a bit more clear,
ui::text::TestRunneris just an alias forTextTestRunner. The old access way throughTextUi::TestRunneris deprecated andTextTestRunnershould be used directly.