[Test] can one run a specific test first?
Hi, I know I can run a test by naming it on the command line or by creating an environment variable. However, I merely want a specific test to be run first to ease debugging, and then all the rest of the tests should be run. Is this possible? Thanks -Thorsten
Thorsten Ottosen
Hi,
I know I can run a test by naming it on the command line or by creating an environment variable. However, I merely want a specific test to be run first to ease debugging, and then all the rest of the tests should be run.
Is this possible?
Put all the other test cases in test suite. If it does not help add dependency of this test suite on the test case. Gennadiy
Den 17-05-2011 00:16, Gennadiy Rozental skrev:
Thorsten Ottosen
writes: Hi,
I know I can run a test by naming it on the command line or by creating an environment variable. However, I merely want a specific test to be run first to ease debugging, and then all the rest of the tests should be run.
Is this possible?
Put all the other test cases in test suite.
Well, not that elegant :-)
If it does not help add dependency of this test suite on the test case.
Ok, thanks. Maybe would be possible to automate this slightly by some minor changes to BOOST_AUTO_TEST_SUITE( XXX ) ? I'm thinking either A. order (run) the test suites by name. This would make it easy for me to change the order without relocating any tests. B. Add a new variant of test suites, e.g. BOOST_AUTO_FIRST_TEST_SUITE( XXX ) which seems less general than A. thoughts? -Thorsten
Thorsten Ottosen
Put all the other test cases in test suite.
Well, not that elegant
Why? it exactly reflects the logic you were after.
If it does not help add dependency of this test suite on the test case.
Ok, thanks. Maybe would be possible to automate this slightly by some minor changes to
BOOST_AUTO_TEST_SUITE( XXX )
? I'm thinking either
A. order (run) the test suites by name. This would make it easy for me to change the order without relocating any tests.
This will lead to more surprises and is not backward compatible.
B. Add a new variant of test suites, e.g.
BOOST_AUTO_FIRST_TEST_SUITE( XXX )
which seems less general than A.
This is indeed not very elegant. I'd rather not multiply entities, if there is a solution expressed in existing terms. Gennadiy
participants (2)
-
Gennadiy Rozental
-
Thorsten Ottosen