If you test web applications across many platforms and don’t use Selenium, a suite of open source tools, you’re missing the boat, says software test expert and author Adam Goucher. In this post, Selenium expert Chris McMahon shares his recent conversation with Goucher about Selenium’s benefits and uses. They also discuss the benefits of using Selenium, the “Selenium value chain,” and Goucher’s projects: an upcoming Pragmatic Press book about Selenium and company that builds custom plugins to IDE.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
The conversation is a meaty one, because both Goucher and McMahon are deeply involved in testing and Selenium. Goucher is co-editor of the book, Beautiful Testing. In February, 2010, McMahon and Marisa Seal released their open source creation, Selenesse, a toolset that bridges FitNesse and Selenium.
Let’s listen in on their interview:
McMahon: Adam, what is Selenium, and what makes it so special that you’ve decided to write an entire book about it?
Goucher: Selenium is, at its core, a set of tools which let you control a browser. What you do with that control is completely up to you. Some frequent fliers use it to reserve aisle seats on their flights, but the majority use it as part of their testing process. After all, the end user of your product is not going to be experiencing the product through their browser as well, not via some wire-line unit testing framework.
What appealed to me originally with Selenium was its ability to control different browsers on different platforms. This was important as I was working at HP at the time and needed to support browsers on Linux and three different variations of Windows. Being open source meant that the price was certainly right and having the source available meant that it could be tailored to any environment.
McMahon: Why did you see a need for a book about Selenium?
Goucher: I’ve been a professional tester for 12 years now and have started to reach the point where I enjoy the teaching and knowledge transfer more than the actual bug discovery. (Shh! Don’t tell anyone that.) What I see in the Selenium community is that people don’t use the suite to its fullest. I’ve been using Selenium for almost four years now and have figured out how to succeed with it. While I tend to blog (http://adam.goucher.ca) about these discoveries, the reach of my blog is limited whereas the reach of a book from Pragmatic Press is far greater.
McMahon: The Selenium Integrated Development Environment (IDE) is the tool most people start with when they want to use Selenium, and you’ve been making improvements to the IDE. What is so attractive about Selenium IDE that you’ve devoted so much effort to it?
Goucher: One of the “Eureka!” moments I had about Selenium is that the sum truly is greater than the individual parts. I’ve started calling this the “Selenium Value Chain.” It starts with IDE, moves along to Remote Control (RC) and then ends with Grid. As you pointed out, a lot of users get their start with Selenium through IDE so that part of the project needs to be active to keep up with dependencies such as new browser versions.
But the emerging commercial and open source ventures starting to use Selenium as their core product offering rarely include IDE. I realized that this was because IDE was not very business friendly in its current state, and it occurred to me that the solution was to emulate the Firebug experience. Firebug is powerful in its own right, but it gets insanely powerful when you start to add Firebug plugins (like YSlow) into it.
This is the future of IDE; a powerful plugin architecture that lets others add even more power onto it. Jason Huggins and Patrick Lightbody both agreed with this vision but were unable to commit time to do it themselves, so in true open source fashion, I had to do it myself. Jason’s company, Sauce Labs did, however, fund it.
McMahon: How did you get involved as a contributor on the Selenium project?
Goucher: The irony of my involvement with IDE is that I spent a large portion of 2009 campaigning to have it neutered to force people into using RC faster. The dirty secret with IDE is that it can’t reach into the database, do if/else logic or loops — well, not elegantly at any rate. Meanwhile, RC lets you use a number of full fledged programming languages to make your scripts more useful and effective. And now, less than a year later, I have started my own Selenium-based company, called http://element34.ca Element 34, that will build custom plugins to IDE, among other things.
McMahon: Will your Selenium book be aimed at beginners or at experienced practitioners? Will it be a straightforward technical manual, or will it also treat the history of Selenium and the place Selenium occupies in the ranks of other similar tools?
Goucher: The book is very much in the initial stages of work; but the plan is to have it be very tutorial in nature and follow a project from the start of the Selenium Value Chain to the end. Pragmatic Press models the voice of their books around the ‘hero’s journey,’ where the reader is the hero. I’m not going to write it with a single type of user in mind, but instead so that anyone can read it and be a better user of Selenium.
Woven in will be my experiences in how a script evolves — Basic -> Data Driven -> Model Driven — and how to solve common, but difficult, scripting problems. Right now, I’m planning on sections dealing with things like Flash/Flex, HTTPS and parallelism, for instance.
But Selenium is so large in the problems it can solve that I recognize that I won’t be able to cover everything. And some things, like writing IDE add-ons, are too narrow in audience that it would have to be a very specific hero, rather than a common one participating in the journey. A commentary on the open source browser drivers and the intertwined relationships between them all is also out of place for this type of book. The plan is to be in the tools and creating stuff right from page one to the very end. Someone else will have to pick up that part of the story.
Adam Goucher explains his role when it comes to using Selenium