> -----Original Message-----
> From: Steve Appling [mailto:[EMAIL PROTECTED]]
> Sent: 26 September 2002 19:09
> To: Cactus Users List
> Subject: Re: Multi Step Tests - Better HttpUnit Integration
>
> Larry, thanks for taking the time to respond.
>
> ----- Original Message -----
> From: "Larry Tambascio" <[EMAIL PROTECTED]>
> To: "Cactus Users List" <[EMAIL PROTECTED]>
> 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.
>
Although I believe it is better to setup the environment without the
need to execute server code in beginXXX (for different reasons already
mentioned by Larry), I am also open to suggestions... :-)
It seems you think it is easier for you to use HttpUnit to set up the
test. Fine! I can accept that. Cactus is very much user-driven ... If
you can submit a patch that doesn't break the existing API but addes a
new beginXXX signature for example, I would gladly apply it. But I don't
have the time to work on that feature ATM.
On a somewhat different subject, I started thinking a while ago about
using HttpUnit internally in Cactus to make the HTTP connection. I can't
remember the details, but I had to abandon the idea as there some
issues.
Thanks
-Vincent
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>