We've used both JWebUnit and HttpUnit in the past to do functional tests of web applications. Both of them seem to have issues in handling javascript. We are not particularly interested in testing the javascript at this point, but JWebUnit and HttpUnit tests have broken since we added some small Ajax components (Dojo Date / Time pickers for instance) to our pages.
Selenium and Watir do not fit because they essentially drive browsers and we are running these tests from CruiseControl on a box where we are not allowed to install a browser.
Canoo's WebTest is pretty good and can handle what you're looking for.
You want HtmlUnit.
It isn't perfect browser emulation (for that you need a browser driver) but it has significant javascript support. Check out the introduction to testing your JavaScript.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With