ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hewitt <MHew...@Armature.com>
Subject RE: junit sequencing
Date Wed, 07 Nov 2001 11:08:09 GMT
Paul,

Yes, I think we are happy with this sort of granularity.
What I was concerned about was at a higher level.
For instance, you might need to populate a database 
with test data, then use it for a number of tests 
before tearing it down and returning it to a known 
state.  Alternatively, you might want to say that 
there is no point in continuing with a particular 
set of tests if an earlier one has catastrophically 
failed.

#!/mjh

> -----Original Message-----
> From: Paul Gregoire [mailto:paul.gregoire@hellonetwork.com]
> Sent: 05 November 2001 17:51
> To: 'Ant Users List'
> Subject: RE: junit sequencing
> 
> 
> Heres how i did it using a suite()...
> 
> import junit.framework.*;
> 
> public class TestMyConfiguration extends TestCase {
> 
> 	public TestMyConfiguration(String name) {
> 		super(name);
> 	}
> 
> 	public void setUp() throws Exception {
> 		super.setUp();
> 		//setup stuff clipped
> 	}
> 
> 	public void tearDown() throws Exception {
> 		super.tearDown();
> 	}
> 
> 	public void testNumberOne() throws Exception {
> 		//do something
> 	}
> 
> 	public static Test suite() {
> 		TestSuite suite = new TestSuite();
> 		suite.addTest(new TestMyConfiguration("testNumberOne"));
> 		suite.addTest(new TestMyConfiguration("testNumberTwo"));
> 		suite.addTest(new 
> TestMyConfiguration("testNumberFive"));
> 		return suite;
> 	}
> }
> 
> -----Original Message-----
> From: Mark Hewitt [mailto:MHewitt@Armature.com]
> Sent: Wednesday, October 31, 2001 7:53 AM
> To: ant-user@jakarta.apache.org
> Subject: junit sequencing
> 
> 
> I'm just thinking about a junit framework for our automated
> ant builds.  Currently, the tests we have been considering have
> an implied order, yet, other than using depend, or hardcoding a list
> of tests, I can't see how to guarantee this sequence in ant.
> For instance, the expansion of a fileset is presumably not
> guaranteed to be alphabetical on all platforms.
> 
> So what methods have been used, an which work best?
> 
> #!/mjh
> 
> --
> To unsubscribe, e-mail:   
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:ant-user-help@jakarta.apache.org>
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message