Boost logo

Boost Testing :

Subject: [Boost-testing] Using BoostTest to run unit tests multiple times without quitting test runner
From: Pankaj (nathani_bits_at_[hidden])
Date: 2012-05-14 19:29:37


I want to use Boost Test to run unit tests multiple times without quitting
the test runner. Here is the pseudo-code to demonstrate what I want to do:

void main()
{
        for(int i = 0; i < 10; ++i)
        {
                char *arguments[] ={ "MyApplication.exe",
                                        "--detect_memory_leak=0"
                                };

                boost::unit_test::unit_test_main( &init_function, 2, arguments);
        }
}

The first time unit_test_main is called, all the boost tests run fine but in
the second iteration, boost test throws an exception.

I looked at the internal code and found that framework is initialized
everytime unit_test_main is called and if framework is already initialized,
boost test doesn't like initializing framework again.

Please let me know if there is any way to run units test multiple times
without quitting test runner.

--
View this message in context: http://boost.2283326.n4.nabble.com/Using-BoostTest-to-run-unit-tests-multiple-times-without-quitting-test-runner-tp4630095.html
Sent from the Boost - Testing mailing list archive at Nabble.com.

Boost-testing list run by mbergal at meta-comm.com