hi to all,
im a java programmer and im new to c++ and i have to say its pain in the a..
;-)
The problem is that i want to get my test methods from a config file. This
text file should look
for example like this:
TestCaseClass.myNumberTest
TestCaseClass.myOtherTest
In every line the testcase class followed by the test method.
My idea is to read every line from the text file inside a loop.
I dont know how to do this, because of the template
TestCaller<TestCaseClass>.
Does anybody know how to the the testmethods from a textfile?
Thankss!!
This is my code:
***************************************
std::ofstream outputFile("testResults.txt"); // This are only the test
outputs, nothing to do with my problem
CppUnit::TextUi::TestRunner runner;
CppUnit::TestFactoryRegistry & registry =
CppUnit::TestFactoryRegistry::getRegistry ();
// I want to get this from a config file !!!!
runner.addTest( new CppUnit::TestCaller<TestCaseClass>("myNumberTest",
&TestCaseClass::myNumberTest) );
runner.addTest( new CppUnit::TestCaller<TestCaseClass>("myOtherTest",
&TestCaseClass::myOtherTest) );
CppUnit::TextOutputter *textOutputter = new
CppUnit::TextOutputter(&runner.result(),outputFile) ;
runner.setOutputter(textOutputter);
runner.run();
****************************************
--
View this message in context: http://www.nabble.com/cppunit-tests-from-config-file-tf2493387.html#a6951300
Sent from the cppunit-devel mailing list archive at Nabble.com.
|