This approach leads to class resolution problems. The test class has to have visibility to web classes. If it is not in the .war, then the .war classes are not found. In fact, I think the ServletTestCase subclass must be in the .war classes directory, not in a .war WEB-INF lib or an .ear lib. Although that may have changed since I tried it last year.
Fred Loney Spirited Software, Inc. www.spiritedsw.com ----- Original Message ----- From: "Clovis Yutaka Harada" <[EMAIL PROTECTED]> To: "Cactus Users List" <[EMAIL PROTECTED]> Sent: Thursday, March 20, 2003 1:10 PM Subject: RE: Separating Cactus tests from the application Never tried this, but i think you can put your test classes in a global classpath instead of inside .ear if you are not confident with your build script. Note that your test classes will still be there during the test and won't be there in production. If you need total isolation from test code then you can�t use cactus. Use httpunit. Using only httpunit you can test exactly what will be in the production environment (but you will not have unit tests). -----Original Message----- From: Andrew van der Voort [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 5:45 PM To: Cactus Users List Subject: RE: Separating Cactus tests from the application OK, thanks for that. We'll go down that track then. We were hoping that we could build for production, test that package (with a separate, smaller package of testing classes and libs), and then distribute that *tested package*, rather than build a distribution package after testing a testing package. Thanks, Andrew >-----Original Message----- >From: Clovis Yutaka Harada [mailto:[EMAIL PROTECTED] >Sent: Friday, 21 March 2003 8:33 a.m. >To: Cactus Users List >Subject: RE: Separating Cactus tests from the application > > >oops! >sorry, you can do both >A) > step 1) ant test (or symply ant) > - Build for testing (include everything into the ear) > - Test > step 2) ant final > - Build for production > >B) > step 1) ant > - Build for production > - Build for testing (include everything into the ear) > - Test > - Throw away the testing package > > >-----Original Message----- >From: Clovis Yutaka Harada [mailto:[EMAIL PROTECTED] >Sent: Thursday, March 20, 2003 5:26 PM >To: Cactus Users List >Subject: RE: Separating Cactus tests from the application > > >You can do both > >-----Original Message----- >From: Andrew van der Voort [mailto:[EMAIL PROTECTED] >Sent: Thursday, March 20, 2003 5:11 PM >To: Cactus Users List >Subject: RE: Separating Cactus tests from the application > > >OK, so what you are both saying is that I have to: >- Build for testing (include everything into the ear) >- Test >- Build for production > >and that I can't >- Build for production >- Build a separate package with the testing components only >- Test >- Throw away the testing package > >Thanks > >Andrew > >--------------------------------------------------------------------- >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] > >--------------------------------------------------------------------- >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] --------------------------------------------------------------------- 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]
