Bob, > -----Original Message----- > From: Brehm, Robert P [mailto:[EMAIL PROTECTED] > Sent: mardi 10 ao�t 2004 20:35 > To: 'Cactus Users List' > Subject: RE: Writing Unit Tests in Cactus > > > Vincent, > > Thanks for the clarification on the scope of Cactus and help suggestions. > I am still unsure how to do to following: > > 1) Create a JUnit client test to invoke a server side Cactus test > redirector and to retrieve the server side test results.
Check the Cactus web site (http://jakarta.apache.org/cactus/writing/howto_testcase.html) for how to write a Cactus tests. What do you mean by retrieving the server side test results. Why do you need to do this? This is a task performed internally by Cactus which will throw any exception to the Test Runner. If you mean getting the HTTP Response, then you can get that in your endXXX methods. > 2) Create a Cactus server side test to retrieve server side test results > and make them availble to the client side JUnit test. If what you mean by test results is "success" or "failure" then this is automatically passed to the client side code and it bubbles up to the Test Runner. Otherwise you do that through the endXXX method. Hope it helps, -Vincent > > Regards, > Bob Brehm > > -----Original Message----- > From: Vincent Massol [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 9:53 AM > To: 'Cactus Users List' > Subject: RE: Writing Unit Tests in Cactus > > > 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] > > --------------------------------------------------------------------- > 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]
