You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by Suman Das <su...@afrinet.co.za> on 2002/11/04 11:19:12 UTC

Which tool?

Hello!
We're planning to conduct unit testing of our J2EE based application (on Weblogic) including EJBs, Servlets, Java files and JSPs. The information provided on the same is a trifle confusing. Could you please let us know precisely the pros and cons of doing all these on Junit3.8.1, JUnitEE1.5.1 and Cactus1.4.1. Basically we wish to know which would be easier to use from a developer's perspective.
Thanks in advance
Regards
Suman


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Which tool?

Posted by Vincent Massol <vm...@octo.com>.
Hi Suman,

There are different part to test in your application (see the front page
of the cactus web site - at the bottom). Here's my current belief:
- for unit testing the business code logic: JUnit and Mock Objects
(EasyMock, or Dynamic Mock from www.mockobjects.com).
- for unit testing integration code (i.e. code that interact with the
container) and for unit testing application configuration/setup: Cactus
- for functional tests (and potentially acceptance tests): HttpUnit (or
for simple cases Cactus, using the HttpUnit integration).

JUnitEE is purely a servlet test runner, i.e. you won't be able to test
container interaction code with it. Personally I don't see much interest
in using it over Cactus, apart from a smaller complexity (or if you only
have EJBs to unit test). That said, Cactus tests are now getting more
and more easy to run with the new front ends: Maven integration is a
breeze, and we're going to release an Eclipse plugin very soon. We also
plan to deliver a Cactus standalone application (same as Ant).

Note: Mock Objects is probably the best approach to unit test java code.
Beware that if you already have code written, it will probably require
that you refactor it mercilessly (but that's good as it will improve
your code).

Hope it helps,
-Vincent

> -----Original Message-----
> From: Suman Das [mailto:suman@afrinet.co.za]
> Sent: 04 November 2002 10:19
> Subject: Which tool?
> 
> Hello!
> We're planning to conduct unit testing of our J2EE based application
(on
> Weblogic) including EJBs, Servlets, Java files and JSPs. The
information
> provided on the same is a trifle confusing. Could you please let us
know
> precisely the pros and cons of doing all these on Junit3.8.1,
JUnitEE1.5.1
> and Cactus1.4.1. Basically we wish to know which would be easier to
use
> from a developer's perspective.
> Thanks in advance
> Regards
> Suman
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-dev-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-dev-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>