Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

repeat testcase in Boost test multiple times

Is there a way to repeatedly run a unit-test or a set of unit-tests in Boost test?

Let say I have the following:

BOOST_FIXTURE_TEST_SUITE(someSuite, someFixture)

BOOST_AUTO_TEST_CASE(someTest)
{
    ...
}

BOOST_AUTO_TEST_SUITE_END()

... and I'd like to run someTest with setup/teardown for let say 100 times.

like image 290
marton Avatar asked May 11 '12 15:05

marton


2 Answers

You can always run your test program in a loop. I do not believe there is test case/suite level feature to do this now. Feel free to request one through the ticket.

like image 152
Gennadiy Rozental Avatar answered Oct 03 '22 11:10

Gennadiy Rozental


According to boost config there is no option to specify multiple times execution.

It is possible to use some Linux commands like:

for i in `seq 10`; do command; done
like image 26
Roman Ivasyshyn Avatar answered Oct 03 '22 11:10

Roman Ivasyshyn