Johan's blog

Testing web projects with Selenium

Actually, I already heard about Selenium in another session, where it was presented as a way to help debugging Java Web based projects. I wrote it down, and wanted to download it when I noticed that there was another session devoted to Selenium.

It is not yet clear to me how the different parts of Selenium relate to each other, but at least I could already use it. I installed the Selenium IDE, which is an extension to Firefox (if you go to Tools - Add-ons, you should be able to find and install it).
That extension allows you to "record" your behavior on any website. The recorded behavior can be played again. But more interesting to a developer, the actions that were recorded can be exported in a number of languages, including Java.

If you install the Selenium Server (http://selenium-rc.openqa.org/download.html), you can create a test-case around the recorded behavior. The actions that you performed on the website can then be initiated from the Java test program, and a number of methods exist for manipulating and testing the actions and results.
I think I am going to use this for automated regression testing, although it requires a lot of discipline while working on web pages (i.e. give names or classes to divs).

Many thanks to the Selenium developers, this is a great tool!


posted on Saturday 10 May 2008 at 05:55
Leave a comment
No comments