jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. B. Rainsberger" <jbra...@rogers.com>
Subject Re: cactus vs httpunit
Date Sun, 23 Nov 2003 22:57:48 GMT
Sachin Dole wrote:

> Hi Everyone,
> I would love to explore Test Driven Development on my projects. Currently, I am
> trying to figure out what is a suitable framework for the projects I work on.
> Typically, projects would involve MVC + EJB + a Data layer + JMS/weblogic for
> multi app integration.
> How does cactus compare with HttpUnit? Or are they comparable at all?

HTTPUnit is all about modeling the HTTP request/response mechanism. It 
is essentially "black box" web application testing.

HTMLUnit plays the same role as HTTPUnit, but focuses more on modeling 
web pages than low-level HTTP protocol stuff. (Example: with HTMLUnit, 
you click on links and submit buttons, rather than creating the HTTP 
request yourself).

Cactus provides a convenient way to run JUnit tests in the application 
server, and so allows you to test deployed application components (EJBs, 
JSPs, servlets).

Here is what I recommend.

Plain JUnit for as many tests as you can: your session bean logic, your 
JDBC code (if any), your message-consuming logic, your 
message-content-producing logic, your overall controller logic.

Cactus for servlet initialization, JSPs and sparingly for EJBs and JMS 
components. (The EJBs and JMS components should be paper-thin.)

HTMLUnit for end-to-end testing through the browser.
J. B. Rainsberger,
Diaspar Software Services
http://www.diasparsoftware.com :: +1 416 791-8603
Let's write software that people understand

View raw message