This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Testing and the fly likes Web Testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Web Testing" Watch "Web Testing" New topic
Author

Web Testing

Paul Croarkin
Ranch Hand

Joined: Sep 30, 2004
Posts: 106
Any comments on the pros and cons of jWebUnit, httpUnit, htmlUnit, Canoo, Cactus, etc?


Thanks,<br /> <br />Paul Croarkin<br />SCEA 5, SCWCD, SCJP
Sidhartha Priye
Greenhorn

Joined: Mar 12, 2006
Posts: 4
Cactus - seems to be the ideal choice when it comes to performing server side (servlet, JSP) unit tests. Since it proposes an incontainer approach your client testcases are reflected on the server container before your actual classes are unit tested. The prime focus is on integration testing.

The only cons I see is that they dont have a plugin for Eclipse where you can run off your tests like we do for JUnit. I use RAD integrated with Tomcat and Cactus lends very well with Tomcat. However the missing plugin uncovers some of the complexities in running these tests using Ant or through a manual deployment process using browser.


HTTPUnit: Have used this tool a lot - very good from a functional testing standpoint, you can build your own wrappers around it to customize as per the needs of your application

CONS - Limited or Poor JavaScript, poor turnaround time, HTTPUnit community not very dedicated to improving it

JWebUnit - was initally written as a wrapper to HTTPUnit, now it is being recirculated as a wrapper to HTMLUnit which seems to have a better JS support. This framework encourages writing easy testcases.
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

I will add Selenium to that list as well

I have mostly used HtmlUnit and JWebUnit in past, after briefly checking out Canoo Web Test (too much xml for my taste at that time )

Really impressed with HtmlUnit. Frequent releases, good support for JavaScript, and most importantly, very good response time on bugs/issues.
A while ago I asked a question at the forums, and created an issue. It was almost immediately taken up by one of the lead developers, Marc Guillemot, and fixed in a matter of days!

I tried JWebUnit for a while. It really simplifies the usage of HtmlUnit, but I found it falling behind in its support of newer versions of HtmlUnit. Ended up writing my own simple wrapper for HtmlUnit.

My comment about Canoo Web Test having too much XML was only half serious. XML may be suitable for many cases, but in my case, many of the tests were going to have similar steps, and I wanted to factor that out into a base class.
If anyone knows how to define certain steps, and parameterize and use them from different Canoo XML files, I will be really interested in hearing about it.

Cheers.


The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Testing