Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which Functional Test Tool Has best Javascript Support

 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Among HttpUnit, JwebUnit and HtmlUnit which one has best support for Javascript?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
None of the above.

JWebUnit is based on HttpUnit. I haven't used HtmlUnit, but the documentation provides says it provides partial support for JavaScript.

The essence of the problem is that these tools are simulating the browser. And since browsers all implement javascript differently, you aren't really testing how the code will behave. To truly test JavaScript, you can use a tool that runs in a browser like JSUnit or Selenium.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All of these three happen to be using the same JavaScript engine internally (Mozilla Rhino) so there shouldn't be that much of a difference between them. Having said that, I'd personally recommend HtmlUnit or JWebUnit over HttpUnit because the development for the latter seems to have halted and HtmlUnit (which JWebUnit uses internally) uses the Jakarta Commons HttpClient instead of a homegrown solution for handling HTTP (and HTTPS) connections, making it a lot more robust than HttpUnit.
 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are books describing HttpUnit, but I can't find any for HtmlUnit. Personally, I'd prefer sticking to one with better documentation available.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic