hi,
can you go through the getting started .html which is there in the docs of cactus
you are never going to invoke thetest case directly in turn the proxy redirector does 
it for you
cheers
--

On Tue, 14 May 2002 20:21:43  
 ���½� wrote:
>Good morning?
>Glad to meet you.
>I'm a Cactus beginner. And can't English well. So, I'm sorry.
>
>I'm studing Apache's TestCase(http://jakarta.apache.org/cactus/howto_testcase.html).
>I did work below.
>
>I made cactustest webapp. Tomcat 4.0.
>
>folder : file.
>cactustest : jspRedirector.jsp ,
>cactustest/WEB-INF : web.xml ,
>cactustest/WEB-INF/classes : SampleServlet.class, TestSampleServlet.class ,
>cactustest/WEB-INF/lib : cactus.jar, junit.jar, log4j-1.2rc1.jar 
>
>Start Tomcat Server.
>
>http://localhost:8080/cactustest/servlet/SampleServlet --> Good.
>But, http://localhost:8080/cactustest/servlet/TestSampleServlet --> Not Good. Error.
>
>Is wrong this my test?
>Next, what will I do?
>
>I want your help.
>Thank you.
>
>
>Below is source of TestSampleServlet.java.
>--------------------------------------------------
>
>import org.apache.cactus.* ;
>import junit.framework.* ;
>
>public class TestSampleServlet extends ServletTestCase
>{
>
> public TestSampleServlet(String theName)
> {
>     super(theName);
> }
> 
> public static void main(String[] theArgs)
> {
>     junit.swingui.TestRunner.main(new String[] {TestSampleServlet.class.getName()});
> }
> 
> public static Test suite()
> {
>     return new TestSuite(TestSampleServlet.class);
> }
> 
> public void testXXX()
> {
>     // Initialize class to test
>     SampleServlet servlet = new SampleServlet();
> 
>     // Set a variable in session as the doSomething() method that we are testing need
>     // this variable to be present in the session (for example)
>     session.setAttribute("name", "value");
> 
>     // Call the method to test, passing an HttpServletRequest object (for example)
>     String result = servlet.doSomething(request);
> 
>     // Perform verification that test was successful
>     assertEquals("something", result);
>     assertEquals("otherValue", session.getAttribute("otherName"));
> }
>}
>
>


________________________________________________________
Outgrown your current e-mail service?
Get a 25MB Inbox, POP3 Access, No Ads and No Taglines with LYCOS MAIL PLUS.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to