> -----Original Message----- > From: Rajagopal. V [mailto:[EMAIL PROTECTED] > Sent: 15 September 2003 23:15 > To: [EMAIL PROTECTED] > Subject: setUp and TearDown for specific Test Cases > > Is there any way you can write a testcase specific > Setup and TearDown method? the setup and tearDown are > run for every single testcase , if i need to have some > setup and teardown for testcases 1, 3 and 5, how would > i go about it.
Easy. Simply create different test cases! JUnit tests must be structured around their fixture, i.e. have a different test case per fixture. So in your case, you'll have one test case for tests 1, 3 and 5 and another test case for the other tests. -Vincent > For e.g. i need to create a few entities before i > invoke a test. Yeah, i can write this in my beginXXX > and endXXX but if i use this, i cannot use any > container specific APIs or i would need to add > jndi.properties or the like to my cactus war(as they > would not be run in the client). > So is there any way like a setupXXX and tearDownXXX > that will be invoked before and after testXXX? > > TIA > Raj > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
