
Deepa S
Yes I would like to know how I need to write my own main in this case?
Also I was wondering if there is any workaround that was found other than re-writing the main?
Here is what I am trying to do, may not be the best way, but trying to re- run the test suite ts1 - 3 consecutive times to test for repeatability:
bool init_unit_test_suite(int argc, char **argv) { test_suite* ts1 = BOOST_TEST_SUITE( "SKUResourcesTestSuite" ); ts1->add( BOOST_TEST_CASE(&TestCase1) ); ts1->add( BOOST_TEST_CASE(&TestCase2) ); framework::master_test_suite().add( ts1 ); for(int i = 0;i < 3;i++) { framework::master_test_suite().add( ts1 ); } return true; }
There is nothing particularly wrong with this approach. It really depends on what exactly you want to test. You can also just make a test case which invokes some other function in a loop or you can run the test module in a loop from outside. Gennadiy