----- Original Message -----
From: "Kevin Jones" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 24, 2001 8:08 AM
Subject: RE: Cactus and Struts


> Struts does have servlets, well in fact it has one servlet that acts as
the
> controller. I've not tried this with Cactus (but am about to), can't you
> send all the requests through the controller (as you're supposed to)?
>

You can but then you're not unit testing your Action class. You're doing
functional testing. It really depends what kind of tests you're trying to
achieve. If you simply want to test your Actions by going through the
ActionServlet, then I guess you could use directly HttpUnit for example
(cactus would not bring any specific added value).

-Vincent

> Kevin Jones
> Developmentor
> www.develop.com
>
> > -----Original Message-----
> > From: Rotkop, Eugene [mailto:[EMAIL PROTECTED]]
> > Sent: 23 October 2001 23:19
> > To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
> > Subject: Cactus and Struts
> >
> >
> > I am trying to use Cactus to test application built using Struts. The
> > example provided with Cactus simply instantiates servlet
> > (SampleServlet servlet = new SampleServlet();
> >         servlet.doGet(request, response);)
> > to test its functionality. In case of Struts, I cannot do this
> > because with
> > Struts application does not have servlets,
> > but just special classes executed by Struts controller servlet.
> > In this case is it possible to use "servlet testing" api of Cactus
> > framework?
> > If it is possible, could anyone provide an example. If not possible,
what
> > would be a good alternative?
> >
> > Thanks,
> > Eugene Rotkop
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>

Reply via email to