• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Watij or HttpUnit?

 
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has anyone used Watij or HttpUnit?

Would appreciate any feedback regarding these frameworks!

Sincerely,
 
author & internet detective
Posts: 42165
937
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
Unnsse,
I've used Selenium which is the same idea as Watij in that it runs in a browser. (It uses a different browser - Firefox.) I like front end testing frameworks that run in the browser as that is where the "real" app runs.
 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeanne,

Thanks for the response!

It is more "mature" than Watij?

Do you have a URL for it?

Is it this one:

http://www.openqa.org/selenium/

Seems like a QA tool instead of a unit testing tool?

Happy programming,

Unnsse
[ March 13, 2007: Message edited by: Unnsse Khan ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Selenium is impressive (definitely check it out), but it does operate on a different level than HttpUnit. HttpUnit (and other, similar libraries like HtmlUnit and jWebUnit) are faster to set up and get going with, but they don't include tools that can create test code by watching a browser.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Unnsse Khan:
[Selenium] is more "mature" than Watij?


Selenium has been around for longer than Watij. I also believe that Selenium is more widely in use.

Originally posted by Unnsse Khan:
Is it this one:
http://www.openqa.org/selenium/


Yes, that's the one.

Originally posted by Unnsse Khan:
Seems like a QA tool instead of a unit testing tool?


Note that none of the tools mentioned in this thread are unit testing tools. HttpUnit, Watij, Selenium, they're all functional testing tools for web applications.
 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:

Note that none of the tools mentioned in this thread are unit testing tools. HttpUnit, Watij, Selenium, they're all functional testing tools for web applications.



Thanks for the clarification! Yes, these type of tools is what I am looking for... More specifically, I am looking for something which supports the AJAX (XMLHttpRequest) object.

I use a 3rd party UI framework (AJAX implementation) and most of the acceptance / functional testing frameworks are not AJAX compliant.

Sincerely yours,
 
Jeanne Boyarsky
author & internet detective
Posts: 42165
937
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
Unnsse,
Selenium and Watij are both playback/record tools. Which means they support anything the browser can do.

You are correct that they are less "programmer" tools than HttpUnit, but that just means you are working at a higher level. Selenium provides hooks if you really want to write code. I find the playback/record mode easiest to use though.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:
Selenium and Watij are both playback/record tools. Which means they support anything the browser can do.


Actually, Watij is not a record/playback tool (or capture/replay or record/replay, whatever you want to call it). With Watij, just like with Selenium's "RC mode", you write tests by writing code and the code drives an actual browser instance. In the case of Watij, this is implemented by the Java code talking to the InternetExplorer COM object. In the case of Selenium, it's a bit more complex and involves the browser constantly downloading "commands" from an intermediary server.
 
Jeanne Boyarsky
author & internet detective
Posts: 42165
937
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
Thank you for correcting me Lasse. Clearly I didn't look at the Watij website in enough detail!
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In particular, watij is effectively a java clone of the ruby-based tool watir (one reason why the name of the original one sounds so much better)

One good way to find out what watij is all about is actually to read about watir.

And, of course, don't forget to add the original watir to your scriptable functional testing tools shortlist. Our test guys love watir, and have taken to scripting tests (and automating data loads, etc.) with it like ducks to, err, watir
 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for all the great feedback, everyone!

In regards to Fitnesse, Selenium, Watij, HttpUnit, etc. - what I am seeking is a way to run one of these as a Ant target. Is this possible?

So, far Selenium RC (RemoteControl) seems to be the best one for my needs...

Sincerely yours,
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Consideration to be taken care of, while using Watij :

1. Runs for IE till now, and NOT for any other browser.
2. Runs on Windows environment only
3. A JUNIT Wrapper over watij script may be a good way of execution. instead of beanshell.
4. Finally all can be automated in ANT build.

HTH
Naveen
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Unnsse Khan:
In regards to Fitnesse, Selenium, Watij, HttpUnit, etc. - what I am seeking is a way to run one of these as a Ant target. Is this possible?


Of the above tools I've run Fit (not Fitnesse), Selenium and HttpUnit through Ant. For Fit, I basically used the <exec/> task and for Selenium and HttpUnit I used the <junit/> task (driving Selenium and HttpUnit from JUnit tests).
 
reply
    Bookmark Topic Watch Topic
  • New Topic