Friday, February 15, 2008

Web testing using WATIR, and WatirRecorder++

Watir - (Web App Testing in Ruby) is a simple open-source library for automating web browsers. It allows you to write tests that are easy to read and easy to maintain. It is optimized for simplicity and flexibility.

 

Why Watir?

It's a free Open Source tool. There are no costs to use the tool.

There's a very active and growing community behind it.

It uses Ruby, a full-featured modern scripting language, rather than a proprietary vendor script.

It is powerful and easy to use.

Don't just take our word for it, read what our users are saying.

 

WatirRecorder++ - New Release of WatirMaker now WatirRecorder

 

Rutger Smit has given the original WatirMaker an overhaul and we're re-releasing it as WatirRecorder++. Here's the original screencast if you want to see what it does. A roadmap will follow soon. Thanks Rutger! This version compiles and runs under 1.1, but it upgrades smoothly to 2.0, so we'll probably do that one day.

UPDATE: We had some trouble getting everyone access on CodePlex so we're putting WatirMaker/WatirRecorder up on OpenQA.org, where Watir itself is hosted.

You can check out the source anonymously using the Subversion URL http://svn.openqa.org/svn/watir-recorder/trunk You can get the source by doing the following:

If you've never installed Watir, here's the easiest possible thing to do:

*       Install the Ruby One-Click Installer.

*       Open cmd.exe and type "gem install watir"

*       Install WatirRecorder++, hit Start, do some stuff (do NOT use the keyboard to submit forms). Hit stop, and playback.

*       Now, STOP everything and remind yourself that this is a jump-starter, that's it.

*       Watir is so incredibly easy, that many folks "get it" and stop using a recorder all together.

*       Read the VERY excellent Watir User Guide. Do read it all, and scroll all the way down. If you skim, you'll possibly miss some goodness.

*       Try using the IRB (run IRB.exe) from the command line to develop your tests. There's great examples.

*       There's also the Ruby version of WatirMaker, and folks are already starting to improve it.

Enjoy.

As an aside, keep an eye out for FireWatir. It's tricky to install and requires a number of bleeding edge things, but it's very shiny.

 

Ref: http://www.hanselman.com/blog/NewReleaseOfWatirMakerNowWatirRecorder.aspx

 

 

Watir Reference URLs:

   http://wtr.rubyforge.org/

   http://wtr.rubyforge.org/install.html

 

Tools:

http://siteadvisor.se/sites/hanselman.com/downloads/ and File name : WatirRecorder_Setup_Lite.msi

Mc Afee Site advisor for the above mentioned MSI file : http://siteadvisor.se/sites/hanselman.com/downloads/2552115/