BANGALORE, INDIA: For any software development project, testing is an integral and important process. To assure that all components of an application are working as per plan and producing desired results, comprehensive testing is done for an application.
To aid these efforts, there are tools available that help in automating the process of testing and eliminating repetitive work for a tester. Selenium is a portable software testing framework specifically designed for web applications.
For software testers who need to record and play their tests, Selenium provides the facility to record a web activity process of the application and then generate a test case based on that. He can then run those test cases continuously without having to manually conduct the constituent steps again and again thereby eliminating repetitive work. Even for software developers, Selenium API is available which helps them to author test cases in Java, Ruby, Python, PHP and other languages.
Selenium was developed by a team of programmers and testers at ThoughtWorks, and is available for free under Apache 2.0 license. The Selenium tests run in most popular browsers, such as Internet Explorer, Firefox, Opera and Chrome, and can be deployed on Windows, Linux and Macintosh platforms.
Getting Started
For recording interaction with the web application, Selenium IDE is used, which is a Firefox add-on. With this month's DVD we have distributed this add-on along with Selenium core testing tools which can be used to execute test suites generated by Selenium IDE on any browser.
To install Selenium IDE onto your Firefox browser, right-click on the file, selenium-ide-1.0.2.xpi, located in the Selenium folder in the DVD and then select 'Open with' option to open the file using Firefox. After installation of the add-on, Firefox prompts for a restart. Once you have restarted the browser, you are all set to use Selenium IDE. However, an prerequisite is that JDK 1.5 should be installed on the system.
Selenium IDE is an integrated development environment for generating Selenium tests that can either be written as HTML tables or coded in various languages like Java, PHP or Python. Currently this IDE is supported only by the Firefox browser.
To demonstrate how Selenium can be used to record and then create tests we will use a typical scenario. Web applications contain forms, and it becomes a tedious task to fill a form each time while testing. Using a previously created web application, PcqContacts, we will generate some test cases using Selenium IDE.