Ok, I've fixed the bug in CVS HEAD and it will be included in the 1.5-rc1 release. Thanks! I've uploaded a manual build of Cactus including this fix at http://cvs.apache.org/builds/jakarta-cactus/nightly/2003-08-31-manual/ if you want to try it.
Thanks -Vincent -----Original Message----- From: Alexander Ananiev [mailto:[EMAIL PROTECTED] Sent: 24 August 2003 06:45 To: Cactus Users List Subject: Re: setUp does not run with ServletTestSuite Hi Chris, >From what I understand, your ServiceTest and UserTest classes are, in fact, Cactus tests, i.e., they extend ServletTestCase or some other Cactus base class. I� am actually trying to re-use plain non-cactus JUnit test cases. Basically, I want to be able to run my �tests on the client and on the server without changing them (I use system property to switch between two modes). So far (before 1.5), I've been extending ServletTestCase and overriding runBare and runTest methods of org.junit.TestCase which seems to do the trick. But I was hoping that I could come up with more elegant solution using wrapped tests supported by Cactus 1.5. I just looked at the source code and verified that runBareServerTest() calls� setUp/tearDown on the wrapping Cactus test as opposed to the wrapped plain JUnit test. Perhaps it's by design (after all setUp/tearDown are protected), I'm not sure. � Thanks, Alexander ----- Original Message ----- From: [EMAIL PROTECTED] To: Cactus Users List Sent: Friday, August 22, 2003 4:31 AM Subject: Re: setUp does not run with ServletTestSuite Hi! That is how we implement a suite ... and it works fine: package com....usermanagement.cactus; import org.apache.cactus.ServletTestCase; import junit.framework.Test; import junit.framework.TestSuite; public class AllCactusTests extends ServletTestCase { � � � � � � � � public AllCactusTests(String theName) { � � � � � � � � super(theName); � � � � } � � � � � � � � public static Test suite() { � � � � � � � � TestSuite suite = � � � � � � � � � � � � new TestSuite("Test for com....usermanagement.cactus"); � � � � � � � � //$JUnit-BEGIN$ � � � � � � � � suite.addTestSuite(UserManagementTest.class); � � � � suite.addTestSuite(ServiceTest.class); � � � � suite.addTestSuite(UserTest.class); � � � � � � � � � � � � //$JUnit-END$ � � � � � � � � return suite; � � � � } } Hope this helps, Chris. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
