Hi Bob, Cactus is a unit testing framework which means it will be useful to unit test your code methods. Cactus will not be good to perform functional testing. For functional testing, you should use one of the existing framework (HttpUnit, HtmlUnit, etc). That means that you would write 2 tests for the following use case: "A JSP page that emits HTML to the user. The user then submits a form to another JSP page.".
The HttpUnit integration in Cactus is only useful to perform assertions on the HTML/XML returned in a Servlet response. It cannot be used to send forms, etc. Please see http://jakarta.apache.org/cactus/writing/howto_jsp.html to see how Cactus can help to unit test JSP pages. For HttpUnit integration, please see http://jakarta.apache.org/cactus/writing/howto_httpunit.html Please also check http://jakarta.apache.org/cactus/faq.html#faq_chaining_requests Thanks -Vincent > -----Original Message----- > From: Brehm, Robert P [mailto:[EMAIL PROTECTED] > Sent: mardi 10 ao�t 2004 18:46 > To: '[EMAIL PROTECTED]' > Subject: Writing Unit Tests in Cactus > > > Hello, > > I am new to Cactus, and I am therefore on the learning curve. I am trying > to test the following: > > 1) A JSP page that emits HTML to the user. The user then submits a form > to another JSP page. > 2) This JSP page that acts as a front controller. It process the form and > then does queries via a business delegate. > 3) If the front controller is successful in (2) then it completes the > transaction then forwards to another JSP page. > 4) This new JSP page emits HTML to the user who then submits a form to > another front controller and so on. > > I have the HttpUnit working to get the HTML and submit the form. I am > having great difficulty in trying to determine the steps required to: > > 1) Intercept parameters that the user submits in a form and, > 2) Call a Cactus test from my client side JUnit program. > > Any help would be appreciated. > > Regards, > > Bob Brehm > > > --------------------------------------------------------------------- > 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]
