jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rod Macpherson" <rmacpher...@abovehealth.com>
Subject RE: Execution Order
Date Tue, 20 Sep 2005 18:12:23 GMT
>> independence is clearly desirable but, ironically, execution order
does not imply test dependency.

I made that point also so it must be obvious:) The tests are independent
but methods under test B through Z may depend on method A. They can run
in any order but one particular order has a distinct advantage: test
method A first and stop testing if that fails. It's not required, it's
just more sensible. 

-----Original Message-----
From: Mark Lybarger [mailto:mlybarger@gmail.com] 
Sent: Tuesday, September 20, 2005 10:51 AM
To: Cactus Users List
Subject: Re: Execution Order

I might point the obvious, but It's usually favorable for each test case
to be independent and not rely on anything in the other tests. It sounds
like your test cases are not truly independent.

On 9/20/05, Rod Macpherson <rmacpherson@abovehealth.com> wrote:
> 
> I'll take another look but I was looking for individual test method 
> ordering. I looked at the suite, in fact that's what I use exclusively

> is suites, but it was the ordering of the testXXX methods withing that

> suite that seemed not to be supported. addTestSuite takes a class not 
> a method name, 'less I have missed something.
> 
> How do you order the individual testXXX methods without creating a 
> class for every method? I didn't see anything for that.
> 
> Public class PhoneTest extends TestCase { public static Test suite() {

> ServletTestSuite suite = new ServletTestSuite(); suite.add(...); 
> suite.add(...); ...
> return suite;
> }
> ...
> }
> 
> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: Tuesday, September 20, 2005 10:04 AM
> To: 'Cactus Users List'
> Subject: RE: Execution Order
> 
> 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
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
>

Mime
View raw message