Repeat test in Boost test several times

Is there a way to rerun a unit test or a set of unit tests in a Boost test?

Say I have the following:

BOOST_FIXTURE_TEST_SUITE(someSuite, someFixture) BOOST_AUTO_TEST_CASE(someTest) { ... } BOOST_AUTO_TEST_SUITE_END() 

... and I would like to run someTest with install / disable to say 100 times.

+4
source share
2 answers

Run the same test several times by specifying the name of the test case in a coma-separated list.

 >example --log_level=test_suite --run_test=testA,testA 

if you need to run it 100 times, just add it to the file specified 100 times and use this file as import

0
source

You can always run your test program in a loop. I do not believe that now there is a test case / set of level function. Feel free to request a ticket through the ticket.

0
source

Source: https://habr.com/ru/post/1412024/


All Articles