jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: endxxx and beginxxx
Date Thu, 23 May 2002 08:42:45 GMT
Hi Ken,

> -----Original Message-----
> From: ken adjei [mailto:kencactus@yahoo.com]
> Sent: 02 May 2002 14:24
> To: Cactus Users List
> Subject: RE: endxxx and beginxxx
> Ok I have read the how to document and I interpreted the sections
where it
> said
> the Junit TestRunner  calls a TestCase.runTest() method. This method
> for a beinxxx(WebRequest) method and executes it if one is found.
> This is executed on the client side (i.e. not in a server engine). The
> WebRequest parameter passed to the beginXXX() method is used to set
> HTTP headers, the HTTP parameters, ... that will be sent in step 2 to
> Redirector proxy.
> 2.The YYYTestCase.runTest() method then opens an HTTP connection to
> Redirector proxy. All the parameters set up in the beginXXX() method
> sent in the HTTP request (HTTP headers, HTTP parameters, ...)
> q)myComment(I would take this to be like a setUp in that you are doing
> fixture) please correct me if I'm wrong

I'm not sure exactly what you mean but I'll say yes ... 

> 8.If no exception occurred, the YYYTestCase.runTest() method looks for
> endXXX(org.apache.cactus.WebResponse) or
> endXXX(com.meterware.httpunit.WebResponse) method and executes it if
> found. At this stage, you have the opportunity to check returned HTTP
> headers, Cookies and the servlet output stream in the endXXX() method,
> again using JUnit asserts and helper utility classes provided by
> q)
> I also need to know after the begin method is called, can you use
> httpservletRequest object in the textxxx methods to get the values you
> up in the begin methods which should have being sent to redirector
> on the server

Answer is yes. You should have a look at the Cactus sample in sample/ of
the cactus distribution. You'll see how to write test cases.


> ---------------------------------
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness

To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>

View raw message