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!!
Craig Andrews said on September 15th, 2008
I think we need to get together and get that up and running here!
Jim Lamoureaux said on September 24th, 2008
Craig Andrews said on September 25th, 2008