Skip to main content

Watir: the first five years

Some of the Watir community has been discussing the history of the project. Here I try to set down some notable things that I remember about that time.

We have to start the story of Watir with Ruby. The first English documentation for Ruby was published in 2000, and it garnered a lot of interest, particularly as it was so amenable to creating Domain Specific Languages (DSLs), which caught the attention of a number of people working in testing, and in the Agile world. Python 2.0 also came out in 2000, and the dominant scripting language at the time was Perl.

Of all the browsers available at that time, only Internet Explorer exposed an API for automating browser actions, via a COM interface. In 2001, Chris Morris published a Ruby library that exploited IE's COM interface called WTR, for Web Testing in Ruby.

At that time, Open Source software was often seen as inferior or even downright suspicious, and was poorly understood by most businesses. Test automation products were exclusively proprietary, and the market was dominated by Mercury Interactive and Borland SilkTest. These products were demonstrably flawed, but had no competition. Watir, and later Selenium, would change that.

Somewhere around 2002 or 2003 Bret Pettichord and Brian Marick created a one-day training session called "Scripting for Testers" that was based on Chris Morris' IE driver. Brian had written a simple timeclock application, and they wrote some structured Ruby around Chris' driver code to show examples of how to go about testing the timeclock application in an automated way. The Ruby interactive shell IRB was also featured in the training. (Aside: I downloaded that code and tried to get it to work, but it was always pretty buggy and difficult to get running. I tried to persuade my managers at the time to let me attend Scripting for Testers, but failed on several occasions. I would later end up teaching SfT myself, once at STAREast, once at STARWest, and once at Agile2006. There are a couple of interesting things that happened at the Agile2006 SfT. This was the only SfT I taught solo, Bret was not there. Owen Rogers, whom I had never met, had agreed to assist me, but he canceled at the last minute, and in fact contacted the conference organizers without my knowledge attempting to cancel the workshop. I stopped that, and led the training myself. The level of skill and knowledge at Agile2006 was significantly more sophisticated than at the STAR conferences, and the students moved very quickly through the material. Just as I was starting to feel overwhelmed as the sole instructor, Elisabeth Hendrickson and Michael Bolton happened to stop by, and they helped me out for a while. )

In 2004, Paul Rogers in Calgary had a child. During his parental leave, while caring for his new infant, he re-wrote the entire WTR codebase from scratch. Somewhere around this time they also decided to change the project name from WTR to Watir, "Web Application Testing In Ruby." Where WTR had been buggy and difficult to use, Paul's rewrite was a massive improvement. Watir began to see a lot of interest from the Ruby community, the Agile community, and the testing community. (Aside: Watir was the first browser automation tool, commercial or open source, that supported iframes. I was testing an iframe-based product at the time, and I submitted a failing test to the Watir mail list. As I recall, Paul told me it would take him about three days to add the iframe support. I replied that I had been waiting for this for three years, and to take his time.)

Today it is hard to understand just how dominant the test automation vendors were at that time, and how obscure the new open source alternatives were. One of those years in the early 2000s, Mercury had their user conference in Las Vegas. Elton John was the entertainment, they were that big. Bret, and a growing number of other technical testers, were adamantly against these companies and their practices, and Watir, and later Selenium, were the means to subvert them. Note that Selenium got its name because Selenium is an antidote for mercury poisoning, and Watir because water ruins silk. By about 2003, Brian Marick had become the Technical Editor for the magazine Software Testing and Quality Engineering, which later changed its name from STQE to Better Software. (The STQE acronym is the basis for SQE's web publication 'Sticky Minds'.) STQE/Better Software supplied a platform for a lot of us to evangelize open source test tools. I published my first professional article in Better Software in 2004.

Bret hired me at Thoughtworks in 2005, where I met Jason Huggins and got a look at an early version of Selenium. Ironically perhaps, I spent my tenure at Thoughtworks doing no UI testing at all, but rather spent my time testing in an API. It would not be until 2012, seven years later, that I would use Watir professionally again, thanks to Ċ½eljko Filipin and Jeff "Cheezy" Morgan. (I did maintain an amateur interest in Ruby, Selenium, and Watir, and I followed the work that Jari Bakken did with the first Watir wrapper for Selenium WebDriver, which was absolutely brilliant. With some help from Jari, in 2010 I used Selenium/webdriver in Ruby to win an iPad from SauceLabs in a contest for "best use of Selenium that is not testing". Perhaps my most far-reaching contribution to the overall Selenium community was in 2011 when I posted on Twitter "if I ever meet Jari Bakken I'm going to buy him a steak bigger than his head." Today Selenium people celebrate with large steaks. I'll also mention here that I believe that Watir was a strong influence on the Selenium version 1 API, in that Selenium v1 supplied a rich set of automatable actions. Webdriver changed the design goals of the Selenium project. The Selenium/webdriver API had only about a third as many methods as Selenium RC. It was Jari's work re-imagining Watir as a superset of Selenium actions that kept the project relevant, and also made Watir a model for other modern rich browser automation projects.)

Finally, I would like to emphasize that Watir has never really been about code, Ruby or otherwise. I believe an early Watir slogan went something like "test tools by testers for testers". Watir more than anything else is a particular approach to browser test design that simply did not exist before. Watir has certainly evolved, and each of the Watir maintainers have taken the project in particular directions, but the Watir community is a group of people who value ease and elegance in browser automation design.