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: Advice needed
Date Mon, 01 Apr 2002 20:06:07 GMT

Several points :

1/ Why don't you use an existing Controller framework (Struts,
Barracuda, WebWork, etc) ? Thus, no need to test it :-)

2/ As your framework is based on servlets it means you still have some
code that bridges the link between the Servlet API and your framework.
Don't you want to test this code too ?

3/ Cactus is more than unit testing framework, it is an integration unit
testing framework, in the sense that it lets you ensure that everything
works together, in the target *environment(s)*. Thus, if you don't use
Cactus you would still need to perform some functional tests to ensure
your framework works. However these tests will not cover as many use
cases as Cactus can cover (as it is a unit testing framework).

If you plan to deliver your framework for several servlet engines,
Cactus is your tool of choice.

That said, it has a steeper learning curve that simple junit as you need
to understand webapp deployment for your container. But that's anyway a
must. Also, the second drawback is that tests tend to take longer to
execute than simple junit tests (but that's only if you're counting your
container startup time, which you can bypass if you leave it running and
use its dynamic reloading features).

Hope it helps

> -----Original Message-----
> From: Arkady_Bari@vertexinc.com [mailto:Arkady_Bari@vertexinc.com]
> Sent: 01 April 2002 20:27
> To: cactus-user@jakarta.apache.org
> Subject: Advice needed
> Hi,
> We have built in home a servlet framework supporting MVC architecture.
> you see advantage of using "cactus" to test event handlers as oppose
> simply
> use junit. Since the controller servlet is responsible for invoking
> event handler simple junit can simulate the controller by  setting up
> handler context and then invoke the handler.handle(...)  method.
> I can gain by using "cactus" ? The only thing I can see that if the
> handler uses session it would be easier to use "cactus" to set the
> content.
>                                                 Thank you
>                                                             Arkady
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>

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