unittest: Calling tests in liner number order

Roy Smith roy at panix.com
Sat May 24 09:44:22 EDT 2008


In article 
<af66b0d4-f77d-4d54-8ee0-94592497d2f2 at l64g2000hse.googlegroups.com>,
 Fuzzyman <fuzzyman at gmail.com> wrote:

> Also, like others, I have had wonderful experiences of trying to track
> down test failures that depend on the order that tests run in. Having
> interdependencies between tests is a recipe for madness...

I agree that tests should not depend on each other, but sometimes it's 
still useful to have the tests run in a certain order for reporting 
purposes.

If you're doing requirements tracking, it's nice to have the tests execute 
in the same order as the requirements are listed.  It makes interpreting 
the output easier.  Sure, you could give the test cases names like 
"test_fr17.3a" and write your own getTestCaseNames(), but just putting them 
into the file in the order you want them to run is easier.  And making 
things easy is what this is all about.



More information about the Python-list mailing list