Skip to content


Selenium Remote Control

(Originally posted 7/26/2006)

I promised a while back to write about the test tool I chose for the automated testing project I’m working on at InsureMe. At this point I have basically completed phase I of my project. I have been using, and am fairly happy with, an open-source tool called Selenium Remote Control (hereafter, SRC). So I guess a product review is in order …

To quote SRC’s website:

Selenium Remote Control is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.

And to quote Pulp Fiction:

That’s a bold statement.

Unlike most marketing statements, this one doesn’t stretch the truth to the far ends of the earth. Any programming language capable of sending an HTTP request can use SRC, and the team provides wrapper functions in Java, .Net, Perl, Python, Ruby, and Selenium’s own Selenese to make things even easier, if you use one of those languages.ÂÂ That should cover just about any web developer out there today, but those of you writing your web code in Cobol, feel free to complain.ÂÂ I am personally using the .Net library, which allows me to create a Windows app with C# and automate my testing via SRC.

The part about any JavaScript-enabled browser is also true. There are several pre-defined browser profiles (IE, Firefox, Opera) and you can use the custom profile to launch any browser you want. Your broswer needs to be JavaScript-enabled because that’s how SRC works - it pipes the HTTP requests through a proxy, and injects JavaScript code to click buttons, enter text, and select options on your web page. I don’t pretend to have a deep understanding of this process, but you can see more details at SRC’s website.

The Selenium suite of tools is actually made up of several components - Selenium Core and Selenium Server, which are the heart of the automation engine; Selenium IDE, which is a Firefox add-on for record-and-playback of tests; SRC; and the Selenese language, which is tailored to sending specific commands to Selenium Server. Without using the tools, it can be difficult to see how this all fits together - again, I would direct you to SRC’s website.

SRC’s advantages are many - the ability to work with so many different programming languages and browsers is one that even most expensive enterprise-level tools don’t have. SRC is open-source and free of charge, so you can try it on your own schedule without spending a penny. The documentation is good, for an open-source project. You can work through the quick tutorial in about 30 minutes and have all the knowledge you need to get started on a real project. The documentation and examples all revolve around unit testing frameworks (XUnit) but it’s not a requirement to use SRC. Any program that uses one of the supported languages can hook in the SRC library and go.

SRC’s disadvantages are few. Support is all forum-based, and to the Selenium team’s credit, they do a very good job of keeping up with the forums and responding to user issues. Still, many people are uncomfortable with this type of support, and for the most part, those people shouldn’t be considering open-source apps anyway. The only other disadvantage I’ve found is that communication between my program and the Selenium Server seems to lock up pretty quickly, if I switch to a different application on my desktop. Theoretically, this shouldn’t happen - Selenium Server is listening for HTTP requests on a specific port, and my program should be able to continue communicating with the server at a later time, regardless of what happens on the desktop. But it does lock up, every time. And it makes debugging and driving tests via a separate Windows app tough at times. It’s not a deal breaker, but definitely an issue that I will continue to investigate.

The bottom line is, SRC fits my needs for a web automation tool very nicely, and it gives me total control in code to create any kind of test tool that I can dream up. I’ll go into more detail about my project in another post, but suffice to say that Selenium and SRC get my thumbs up. Selenium should definitely be on your short list if you are evaluating any kind of web testing automation.

Posted in Software. Tagged with , , .

One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Haden wore a three piece Tom Ford suit and Christian Louboutin gold studded loafers for the ceremony (see pictures here) and changed into a blue Etro suit with Hugo Boss shoes for the reception.

Some HTML is OK


(required, but never shared)

or, reply to this post via trackback.