You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Rod Macpherson <rm...@abovehealth.com> on 2005/09/20 18:55:27 UTC

Execution Order

JUnit lacks execution ordering and, by extension, so does Cactus. Test
independence is clearly desirable but, ironically, execution order does
not imply test dependency. That is to say execution order is an
independent notion. 

Let's say I have a dozen tests. They all run independently, however, all
the tests are dependent on the code excersied by the first test. Again,
they aren't dependent on the first test but rather the code that test
exercises. So, it makes a heckuvalotta sense to run the first test first
and bail out early. Any way of ordering execution? Perhaps that too
dangerous in that dependencies might bleed through? 

TIA


RE: Execution Order

Posted by Vincent Massol <vm...@pivolis.com>.
Actually JUnit does not lack ordering :-) The way to do it through a Test
Suite. Just create one and add each test individually to the suite in the
order you want. Check the JUnit FAQ for more details on this.

Thanks
-Vincent

> -----Original Message-----
> From: Rod Macpherson [mailto:rmacpherson@abovehealth.com]
> Sent: mardi 20 septembre 2005 18:55
> To: Cactus Users List
> Subject: Execution Order
> 
> JUnit lacks execution ordering and, by extension, so does Cactus. Test
> independence is clearly desirable but, ironically, execution order does
> not imply test dependency. That is to say execution order is an
> independent notion.
> 
> Let's say I have a dozen tests. They all run independently, however, all
> the tests are dependent on the code excersied by the first test. Again,
> they aren't dependent on the first test but rather the code that test
> exercises. So, it makes a heckuvalotta sense to run the first test first
> and bail out early. Any way of ordering execution? Perhaps that too
> dangerous in that dependencies might bleed through?
> 
> TIA