This post originated from an RSS feed registered with Java Buzz
by Steve Conover.
Original Post: HttpUnit good, Cactus not so good
Feed Title: Steve Conover's Weblog
Feed URL: http://www.sonic.net/~conover/index.rdf
Feed Description: Mostly java-related.
HttpUnit is a great tool, it has some nice abstractions that insulate you from view logic changes. UI people are unlikely to break your tests (how often is it that a developer isn't involved in a decision to, say, add or remove a form field? Change the format of a url? Probably never.). OTOH, I'm not a big fan of Cactus. I got it working a while back, and was uncomfortable with in-container testing. After all, what's the guarantee that once you remove the test-support classes from your server, that things will still work? It's not very likely that they won't, but I'd rather have the exact same server environment in both dev and production. In addition, I'm not sold on the benefits of in-container testing. Since Webwork doesn't require an HttpServletRequest or Response to be passed into its actions (vs another popular MVC framework), I get nearly complete unit-test coverage of my server code without a running servlet engine. Couple that with HttpUnit acceptance/functional tests and you have 100% coverage. Why do I need Cactus? I barely even need MockObjects with this setup....