Thursday 17 April 2014

Introduction to Selenium



Introduction to Selenium :

Selenium is a free (open source) automated testing suite for web applications across different browsers and platforms.

Selenium is not just a single tool but a suite of software, each catering to different testing needs of an organization. It has four components.

    Selenium Integrated Development Environment (IDE)
    Selenium Remote Control (RC)
    WebDriver
    Selenium Grid


History of Selenium :

Selenium was invented by Jason R. Huggins and team while they were working on a project in ThoughtWorks.

Having realized that the repetitious manual testing of their application was becoming more and more inefficient, he created a JavaScript program that would automatically control the browser's actions. He named this program as the "JavaScriptTestRunner".

It came from a joke which Jason cracked one time to his team. Another automated testing framework was popular during Selenium's development, and it was by the company called Mercury Interactive (yes, the company who originally made QTP before it was acquired by HP). Since Selenium is a well-known antidote for Mercury poisoning, Jason suggested that name. His teammates took it, and so that is how we got to call this framework up to the present.

Test cases is selenium can be written in HTML or many other popular programming languages supported by selenium like Java, C#, Ruby, Python etc.

Advantages of Selenium

1. Open Source (Free)
2. Supports most browsers like IE, Firefox, Mozilla.
3. Supports all Operating Systems.
4. Supports all programming languages Java,Ruby,C# and Python.
5. Run multiple tests at a time.
6. Can be used for functional as well as non functional tests.

 Disadvantages of Selenium :

1. It does not support and non web-based applications, it only supports web based applications.
2. Its and open source tool so in case of any technical issues you need to rely on the selenium community forums to get your issue resolved.
3. You need to know at least one of the supported language very well in order to automate your application successfully.
4. No inbuilt reporting capability so you need plugins like JUnit and TestNg for test reports.
5. Lot of challenges with IE browser.
6. Does not support file uploads from local machine. You need separate up-loader tool for the same.
7. Parametrization can be done via programming but is difficult to implement. 


 Why use Selenium

1) Freedom to Choose language, you are expertise in 
2) Develop Script once, Run the same on multiple browser
3) Lightweight Tool
4) Parallel Script Execution 
5) Open Source Tool  



 Different Types of Selenium :


There are four variants of Selenium, which can be used in isolation or in combination to create complete automation suite for your web applications.

1) Selenium IDE – Recording/Creating and Enhancing scripts

2) Selenium Remote Control (RC)– Executing scripts

3) Selenium Web Driver (API) – Cross browser testing

4) Selenium Grid – Cross platform testing

At the moment, Selenium RC and WebDriver are merged into a single framework to form Selenium 2.




No comments:

Post a Comment