“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:
- Selenium IDE: a firefox plugin that “record” the test to be done, and save it as a java/python/perl program;
- Selenium RC: a java (no tomcat) server which helps to execute the script.
Example: let’s create a test to verify our login application
- download/unzip the framework in you PC and run the server
- run firefox selenium plugin
- click on the “record” red button (similar to the MSOffice one for recording macros)
- go to our webapp url, and submit login form, then click on “check mail”
- click on “save” button, choosing your file format (eg. python)
- save the file in the server folder as testWebmailLogin.py
- edit testWebmailLogin.py and change the basic url (eg. webmail.example.com)
- run testWebmailLogin.py
- 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..