• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Which Functional Test Tool Has best Javascript Support

 
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Among HttpUnit, JwebUnit and HtmlUnit which one has best support for Javascript?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic