Web application testing toolsPosted: June 25, 2006
Automation of basic tasks is important – work smart and efficient. I am trying out Watir (pronounced water) for web application testing. Watir stands for "web application testing in Ruby". Watir was recommended to me by two other sr. technologists (thanks Anjali and Nikhil).
The advantages are many. I wrote my first (dead simple) script within 15 to 30 minutes. This way, I can also avoid any harness-specific issues. I also avoid the "recording" phase. My tests scripts are already parameterizable, since they are written in a programming language.
What does it lack? Anyone heard of firefox and linux? I cannot run Watir of a Linux/POSIX box as it stands today. I am already thinking of extending Ruby to provide handles for SOAP, LDAP and other application protocols. I am not sure how easy or hard that would be.
To what can I compare it? I tried to first pick up on Apache JMeter. I ran into two problems. Firstly, a lack of simplified documentation to get me started with writing a simple test script. Have a look at the first page of "Building a test plan" in the JMeter user manual. The second is subjective – I felt the interface to compose a test "story" (If I may call it that) was not intuitive. Nevertheless, people who do know JMeter will swear by it for automation of functional as well as performance testing.
My research is far from complete. Yet, I will bet my money on writing scripts in a language rather than through a point and click user interface. Power over usability. This also implies that I will have to first gain expertise in Ruby to get anywhere near exploiting Watir to the hilt. Later, I could try and peek into JMeter's internals to see if scripts can be written in the native language with little learning other than knowledge of Java.
- Scripting Web tests in Watir – Rubyforge.
- The Watir FAQ page.
- Introduction to Apache JMeter.
- Apache JMeter user manual.
Update: Also have a look at the Selenium IDE. Selenium is similar to Watir but automates the process of script creation through point and click. So the choice of power or usability is really up to you. An advantage is, Selenium will work on Linux/POSIX and Mac OSX. Selenium is built and supported by Thoughtworks.
- Selenium IDE at work (Demonstration video).