jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Appling" <steve...@appling.org>
Subject Re: Multi Step Tests - Better HttpUnit Integration
Date Thu, 26 Sep 2002 18:08:42 GMT
Larry, thanks for taking the time to respond.

----- Original Message -----
From: "Larry Tambascio" <ltambascio@charter.net>
To: "Cactus Users List" <cactus-user@jakarta.apache.org>
Sent: Thursday, September 26, 2002 1:34 PM
Subject: Re: Multi Step Tests - Better HttpUnit Integration

> ... What
> about those preliminary servlets??  Do you have tests for
> them??  It seems like there should be a starting servlet
> that simply needs the container/application up and running
> (and little else beyond maybe user login info).  Start
> with that.  Get a test case for that servlet that
> initializes the environment, and then move on to the next.
>  You are running your Cactus servlet redirector in the
> same container as your application, right?  Then it should
> have everything that all the other servlets have available
> to them.

I started down that road, but that seems to require chaining multiple test
cases that depend on being run in a particular group or particular order.  I
have tended to avoid that since I have found that I need to then store
information in static fields to communicate things like session ids between
tests.  This seems to get messy and fragile quickly.

> I don't mean to oversimplify or minimize your plight, but
> manually setting up the environment can be messy,
> especially if alot is needed.  Your HttpUnit solution
> could well be the simplest way of setting up the context.
>  That doesn't necessarily make it the best.

You are correct about that.  I guess I was really trying to determine if
there were some other ways of accomplishing the same thing (sending multiple
requests before my real test case) using just Cactus.  I'm new to Cactus and
this was the only thing I could come up with.  I understand this type of
testing may be not be considered strictly a unit test, but I believe it is
the appropriate type of test for my current situation.  If this is a common
requirement for other Cactus users, it might be nice to facilitate these
types of requests in a future version.  I wanted to see if anyone else felt
a similar need.

Thanks again for your comments.

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