Cure insanity with Selenium!

“insanity is to keep repeating the same thing and expecting different results”

This Einstein quote comes to my mind each time I’ve to face functional testing (aka repetitive clicking on each webapp link). SeleniumHQ is a framework that automatize this job. It’s based on 2 components:

  1. Selenium IDE: a firefox plugin that “record” the test to be done, and save it as a java/python/perl program;
  2. Selenium RC: a java (no tomcat) server which helps to execute the script.

Example: let’s create a test to verify our login application

  1. download/unzip the framework in you PC and run the server
  2. run firefox selenium plugin
  3. click on the “record” red button (similar to the MSOffice one for recording macros)
  4. go to our webapp url, and submit login form, then click on “check mail”
  5. click on “save” button, choosing your file format (eg. python)
  6. save the file in the server folder as
  7. edit and change the basic url (eg.
  8. run
  9. check output

Selenium will run a firefox instance for you, and you’ll see the browser repeating the action you recorded!

Obviously you can use selenium to stress your webapp too!!! A quickstart is here..

Lascia un commento