1. What is Selenium?
Selenium is a portable software testing framework for web applications. It is a JavaScript framework that runs in web browser, works anywhere JavaScript supports. Selenium provides a test domain specific language (DSL) such as HTML to write tests in a number of popular programming languages, including Java, Ruby, Groovy, Python, PHP, and Perl. Selenium deploys on Windows, Linux, and Macintosh platforms.
Note : Selenium RC and WebDriver are merged into a single framework to form Selenium 2. Selenium 1 refers to Selenium RC.
2. Why is Selenium?
There are several reasons to choose Selenium. Of course, it is open source and because of that it is easy to learn as you may find lots of resources in the internet.
1. Supports many browsers.
2. Supports many scripting/programming languages.
3. Flexible to your choice, simple record and playback (IDE), Comple Framework design to your choice by using your favorite programming language.
4. Supports parallel execution.
If you are not a programmer, you may think Selenium is not for you. But actually it is not. Selenium IDE is for non-programmers. It is just as an add-on on the firefox browser, using which you can record your tests and play them when required. However, everything has pros and cons. The limitation of IDE is it can only be used on firefox.
Let's say, you have to test on multiple browsers, then you need Selenium Grid or WebDriver. It needs some programming knowledge actually.
3. Selenium Components
I. Selenium IDE
Selenium Integrated Development Environment (IDE) is the simplest framework in the Selenium suite. Selenium IDE provides auto complete for all the selenium commands. Selenium IDE is a Firefox extension and you can't run that on other browsers. And also if you need to write more complex test cases you need either Selenium RC or WebDriver.
II. Selenium Remote Control (Selenium RC)
Selenium RC allows us to write the test cases in many programming languages against any HTTP website using any javascript-enabled browser. Selenium RC has a server which automatically launches and kills browsers, and acts as a HTTP proxy for web requests. As of version 2.25.0, RC can support the following programming languages:
- Java
- C#
- PHP
- Python
- Perl
- Ruby
II. Selenium WebDriver
The WebDriver proves itself to be better than both Selenium IDE and Selenium RC in many aspects. It implements a more modern and stable approach in automating the browser’s actions. WebDriver, unlike Selenium RC, does not rely on JavaScript for automation. It controls the browser by directly communicating to it. The supported languages are the same as those in Selenium RC.
- Java
- C#
- PHP
- Python
- Perl
- Ruby
Selenium Grid
Selenium Grid is a tool used together with Selenium RC to run parallel tests across different machines and different browsers all at the same time. Parallel execution means running multiple tests at once.Features:
- Enables simultaneous running of tests in multiple browsers and environments.
- Saves timeenormously.
- Utilizes the hub-and-nodes concept. The hub acts as a central source of Selenium commands to each node connected to it.
References:
1. Introduction to Selenium - http://www.guru99.com/introduction-to-selenium.html#FqC8pSbCRyYrsA0r.99
2. A selenium blog for beginners - http://javabeanz.wordpress.com/2009/12/21/a-selenium-blog-for-beginners/
Comments
Post a Comment