September 15

Testing UI using Selenium IDE and RC

On my current project, every change is accompanied by a long and tedious regression testing. Most of it is testing the JavaScript validation and the UI. This usually involves 100,000 clicks on different browsers!!

I was always looking for a chance to play with Selenium IDE and this was the perfect opportunity. Selenium is a suite of test tools to automate web app testing. There are usually two types of scenarios you would like to test:
1) Checking the style of the page
2) Validating if certain actions result in particular content on the page

Selenium offers three different tools to accomplish UI testing :

1) Selenium IDE : is a firefox plugin that records your activity and converts it to a Selenium test!! IDE can also convert your test in various programming languages that you can use with RC. The only disadvantage is it does not allow multi browser testing. Check out the intro video here

2) Selenium Remote Control: allows you to automate testing using different browsers in a programming language of your choice (Java, C#, PHP, Ruby, Python are supported). RC requires a server which acts as http proxy and launches browsers against any http website. You can use local-host as the RC server. The best way is to create your test scenarios using IDE and add a test case in RC code.

I have created a simple project for Selenium testing using C#. The source code can be checked out here. This can be used as a good starting point to add more complex testing scenarios.

3) Selenium Grid: allows you to scale out testing using multiple servers.

Selenium is perfect for testing Ajax apps and can be easily incorporated in a Continuous Integration System. Selenium cannot test Flash interactions (as expected).

Happy Testing!!

Comments

  1. Craig Andrews said on September 15th, 2008

    Here’s an article that describes how to combine Selenium and Hudson: http://www.thinkvitamin.com/features/webapps/easy-automated-web-application-testing-with-hudson-and-selenium

    I think we need to get together and get that up and running here!

  2. Jim Lamoureaux said on September 24th, 2008

    Neal Ford (http://www.nealford.com/) has written a new book called the Productive Programmer: http://techbus.safaribooksonline.com/9780596519780. In the chapter on Automation, he describes another use of Selenium: automating the walking of web pages. The use case he gives is where a programmer is working on the last page of a multi-page wizard. Selenium is useful in allowing the programmer to quickly “walk” the pages leading up to the page being developed.

  3. Craig Andrews said on September 25th, 2008

    I just randomly ran across a competitor to Selenium, called Windmill http://www.getwindmill.com That also seems to be worthy of looking into. And here an article on how to tie it into Hudson: http://adamchristian.com/archives/43

Add a comment
Technorati Profile

Browse posts by month

Browse by author

We're always looking for rockstars

Come take a look at careers with Molecular