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
looks
> 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
the
> HTTP headers, the HTTP parameters, ... that will be sent in step 2 to
the
> Redirector proxy.
> 2.The YYYTestCase.runTest() method then opens an HTTP connection to
the
> Redirector proxy. All the parameters set up in the beginXXX() method
are
> 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
a
> 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
an
> 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
Cactus.
> 
> 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
set
> up in the begin methods which should have being sent to redirector
proxy
> 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.

Thanks
-Vincent

> 
> 
> 
> 
> ---------------------------------
> 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>


Mime
View raw message