jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gunnar Ole Skogen <Gunnar.Sko...@ergo.no>
Subject RE: Concatenating two cactus tests?
Date Mon, 25 Feb 2002 06:41:27 GMT
Hi,

If B is dependent on results of A etc. I solved this by keeping the response
from A in a static and using it to generate the B request. You have to
administer the dependency logic yourself ( say A-response is needed in D
test also but the B-response is needed for the C-test etc.)

Gunnar Skogen


-----Original Message-----
From: Marko Balabanovic [mailto:marko@cellectivity.com]
Sent: 22. februar 2002 15:33
To: cactus-user@jakarta.apache.org
Subject: Concatenating two cactus tests?


I'm trying to construct a Cactus test that involves stringing together
several HTTP requests.  Something like:

1. Make request A (call method on servlet A)
2. Output is a list of items (don't know ahead of time how many will be
returned)
3. Make request B for each item on the list (call method on servlet B,
passing a parameter from the output of the servlet A method, n times)

Does anyone have any advice on doing something like this?

The problems are that:
- I can't really make both requests A and B inside one test method,
since inside there I cannot change any request parameters (I only have a
handle on HttpServletRequestWrapper, rather that WebRequest)
- Ideally I could dynamically create a test suite that includes one test
that checks request A and then n tests to check request B.  But to do
this I need to see the output of request A inside my static suite()
method.  This seems to be hard as I have no access to any
request/response objects.
- If I call another test case or suite from within my suite() method,
all I get back is a TestResult object, whereas I really need some custom
output.  I can't even examine the state of the test case object, since
the suite() method is executed in the client-side instance whereas the
test itself happens in the server-side instance.

Should I be using some tool other that Cactus for this kind of testing?

Thanks,

Marko Balabanovic



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

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