jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lybarger <mlybar...@gmail.com>
Subject Re: Execution Order
Date Tue, 20 Sep 2005 17:50:56 GMT
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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message