jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Appling" <steve...@appling.org>
Subject Multi Step Tests - Better HttpUnit Integration
Date Thu, 26 Sep 2002 13:21:28 GMT
I find that I frequently need to implement tests that require multiple HTTP request/response
round trips to set up the conditions for the test.  I have been implementing this by using
HttpUnit inside my beginXXX method to make a WebConversation and use an HttpUnit to send requests,
check response, send next request, etc.  After the multi-request setup is complete I can set
up the org.apache.cactus.WebRequest for my real test request that will go to my testXXX method
and allow me to make assertions about the resulting state of my servlet in my real container
(something I can't do with just HttpUnit).

I would think that multi-request setup would be a typical requirement.  Are other people doing
something similar - or has this been solved in a different way?

What I would like to see in a future version is better integration with HttpUnit in the beginXXX
methods.  I very much like the version of the endXXX methods that takes a com.meterware.httpunit.WebResponse.
 I would like to see a similar version of the beginXXX that takes a com.meterware.httpunit.WebRequest
instead of the Cactus one.  I am very new to Cactus, so perhaps I am missing something here,
but this seems like a useful approach to me.  Any input would be appreciated.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message