You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Bret Kumler <bk...@firstam.com> on 2003/10/17 22:55:23 UTC
Question about Servlet TestSuite
I have the following script
package com.test;
import junit.framework.*;
import org.apache.log4j.Logger;
public class AllBatTests{
private static Logger logger = Logger.getLogger(AllBatTests.class);
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(com.test.QaServiceBatTest.suite());
suite.addTest(com.test.QaProductBatTest.suite());
return suite;
}
}
If I change it to
public static Test suite() {
ServletTestSuite suite = new ServletTestSuite ();
suite.addTest(com.test.QaServiceBatTest.suite());
suite.addTest(com.test.QaProductBatTest.suite());
return suite;
}
Can I still use JUnit to run the test or do I need seperate test suites?
Thanks
RE: Question about Servlet TestSuite
Posted by Vincent Massol <vm...@pivolis.com>.
> -----Original Message-----
> From: Bret Kumler [mailto:bkumler@firstam.com]
> Sent: 17 October 2003 22:55
> To: Cactus Users List
> Subject: Question about Servlet TestSuite
>
> I have the following script
>
> package com.test;
>
> import junit.framework.*;
> import org.apache.log4j.Logger;
>
>
>
> public class AllBatTests{
>
>
> private static Logger logger = Logger.getLogger(AllBatTests.class);
>
>
> public static Test suite() {
> TestSuite suite = new TestSuite();
> suite.addTest(com.test.QaServiceBatTest.suite());
> suite.addTest(com.test.QaProductBatTest.suite());
> return suite;
> }
> }
>
> If I change it to
>
> public static Test suite() {
> ServletTestSuite suite = new ServletTestSuite ();
> suite.addTest(com.test.QaServiceBatTest.suite());
> suite.addTest(com.test.QaProductBatTest.suite());
> return suite;
> }
>
> Can I still use JUnit to run the test or do I need seperate test
suites?
I don't understand. What you have written *is* a test suite. As with all
cactus tests you need to use a JUnit test runner to start the test.
-Vincent
RE: Question about Servlet TestSuite
Posted by Vincent Massol <vm...@pivolis.com>.
> -----Original Message-----
> From: Bret Kumler [mailto:bkumler@firstam.com]
> Sent: 17 October 2003 22:55
> To: Cactus Users List
> Subject: Question about Servlet TestSuite
>
> I have the following script
>
> package com.test;
>
> import junit.framework.*;
> import org.apache.log4j.Logger;
>
>
>
> public class AllBatTests{
>
>
> private static Logger logger = Logger.getLogger(AllBatTests.class);
>
>
> public static Test suite() {
> TestSuite suite = new TestSuite();
> suite.addTest(com.test.QaServiceBatTest.suite());
> suite.addTest(com.test.QaProductBatTest.suite());
> return suite;
> }
> }
>
> If I change it to
>
> public static Test suite() {
> ServletTestSuite suite = new ServletTestSuite ();
> suite.addTest(com.test.QaServiceBatTest.suite());
> suite.addTest(com.test.QaProductBatTest.suite());
> return suite;
> }
>
> Can I still use JUnit to run the test or do I need seperate test
suites?
I don't understand. What you have written *is* a test suite. As with all
cactus tests you need to use a JUnit test runner to start the test.
-Vincent