jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JONES,TIM (HP-PaloAlto,ex1)" <timothy.jo...@hp.com>
Subject Automating multiple requests
Date Tue, 01 Apr 2003 22:26:35 GMT
I am a relatively new user of cactus.  In trying to test a controller
servlet, I am trying to automate the setting of request components as much
as possible.   Here is my understanding of how things work and the issue:

 - When the test case is executed, beginXXX() is called on the client side.
This can be used to set all manner of request objects (cookies, headers,
etc).  For our needs, the most important piece is the URL itself, with
attendent query parameters.
 - Next, the testXXX() method is called on the server, with access to
implicit container objects initialized with the request created in
beginXXX().

The controller servlet is a little complex (and messy), containing methods
to parse the URL in several ways, extract parameters, extract encoded
strings, extract cookies and based up these items set one of several
different request scope attributes.

That said, it would be nice if there was a way to specify a set of URL
components (things passed to setURL()), and for each item in the set,
initialize the WebRequest object, and have a set of test cases called on the
server.  Something like:

create group of URL components
foreach item in group {
    foreach testXXX method {
        setURL in beginXXX
        testcase executed on server side
        assertions made (passed from client side?)
    }
} 

Does this make sense?  Is anyone aware of any tool/framework that might
help, or some idea on how to accomplish this?

Thanks in advance,

Tim

Mime
View raw message