Watir - Web Application Testing in Ruby
"Watir" (pronounced water) stands for "Web Application Testing in Ruby". Watir is an automated test tool which uses the Ruby scripting language to drive the Internet Explorer web browser. Watir is a toolkit for automated tests to be developed and run against a web browser.
Plan what you need to get Watir to do before you begin scripting. Open your web browser with the application under test in front of you, and pay close attention to the objects on that page. What text fields require entries? What buttons need to be pushed? What links need to be clicked on? It sometimes helps to write out the steps it will take to exercise a test first, and then filling in the Watir scripting code to satisfy each of those steps.
It is a good idea to view the source of the page (in Internet Explorer, right click and select View Source) and get an idea of what the attributes of the objects you need to interact with are.
To start developing a test:
- Open your text editor.
- Name your test file with a .rb (Ruby) extension.
- Provide your new test file with access to the Watir tool by entering this statement at the beginning of your test script: require ‘watir’
- Open Internet Explorer and navigate to the application you wish to test
- Interact with it to design your test case
- Using the Watir methods below, type the corresponding Watir methods into your test script
- Verify the result
It’s interesting to see that you can interact with all the elements of a webpage such as : buttons, URL, checkboxes, radio buttons, IDs,frames and others.
So once the script is done, you just load it and run it. I didn’t have time to check it inside out, but I think it’s a great web application testing framework which deserves more coverage and exposure.
Find out more about Watir on the project’s website.
If you enjoyed this post, make sure you subscribe to my RSS feed!
Thank you for reading this post. You can now Leave A Comment (0) or Leave A Trackback.
Post Info
This entry was posted on Friday, July 20th, 2007 and is filed under Web Applications, Brute Force, Tools.You can follow any responses to this entry through the Comments Feed. You can Leave A Comment, or A Trackback.
Previous Post: Lemon - Google’s own Web Security Fuzzer »
Next Post: New Tool : Secunia Personal Software Inspector »
Read More
Related Reading:- Free alternative to ArcSight ESM ? Hardly..
- Privacy Dilemma: How to Protect Yourself Online
- Solera Networks Deep-Packet Capture Review
- WordPress Exploit Scanner
- Phishing Exposed, Brands Secured
- Scanners: New Nessus Release; New eEye Web Scanner
- Good News from ArcSight and Imperva
- CCTV Security Camera and Surveillance Equipment
- OpenDNS Offers Free Web Content Filtering
- Can I Evade ScanSafe Anywhere+ ?

