jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: Multi Step Tests - Better HttpUnit Integration
Date Fri, 27 Sep 2002 18:24:14 GMT


> -----Original Message-----
> From: Steve Appling [mailto:steve100@appling.org]
> 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" <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.
> 

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:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message