Selenium automation is path-breaking achievement in terms of the features that it has and the tasks that it performs. There were many tools in the market before and after it but Selenium soon led the market in terms of the usage. And this is so because it's easy to learn, simple to use, free to download and effective in implementation. You can read more about selenium from my last article.
This article describes the tools those combinedly forms the Selenium Tool Suite; namely Selenium IDE, Selenium RC(Remote Control), Selenium Webdriver and Selenium Grid. These tools constitute as what we call Selenium Automation tool. Each tool has its purpose and should only be used based on that. So, how do you know which tool is best for you?
1. Selenium IDE
Selenium Integrated Development Environment(IDE) is the Firefox plugin used to create test scripts. It can do a simple record-and-playback of the user interactions with the browser and then exports them as a reusable script in one of many programming languages that can be later executed. Due to its easy-to-use interface, it can be grasped very fast.
It is a prototyping tool and has no support for iteration and conditional operations. Hence, it is advisable to use Selenium 2 or Selenium 1 for serious and robust test automation.
2. Selenium Remote Control(RC) or Selenium 1
Selenium RC was the main selenium project for a long time before it was merged with Webdriver project to form Selenium 2. It support several languages (Java, Javascript, Ruby, PHP, Python, Perl and C#) and almost every browser. Selenium RC has two components:
- The Selenium Server which launches and kills browsers, interprets and runs the Selenese commands passed from the test program, and acts as an HTTP proxy, intercepting and verifying HTTP messages passed between the browser and the AUT.
- Client libraries which provide the interface between each programming language and the Selenium RC Server.
It was successful in overcoming the Same Origin policy, through proxy injection. Previously, Selenium Core was unable to open the pages of the different domains.
3. Selenium Webdriver or Selenium 2
Selenium Webdriver was developed to overcome the limitations of Selenium RC and is more advanced than Selenium IDE. It better supports dynamic web pages where elements of a page change without the page itself being reloaded. It has well-designed object-oriented API to interact with browsers. It supports all the languages and browsers supported by Selenium 1. Selenium 2 still runs Selenium 1’s Selenium RC interface for backwards compatibility.
Webdriver does not rely on injected Javascript functions for automation unlike Selenium RC, instead it makes direct calls to the browser using each browser’s native support for automation.
4. Selenium Grid
Selenium Grid is a tool that allows user to run the tests in parallel across multiple environments, thereby distributing the large test suite over different machines and different browsers. It runs the test simultaneously at the same time using different machine and hence saving the time and boosts the performance.
How to Choose the Right Selenium Tool:
Selenium IDE:
- Learn the basics of Selenium and get familiar with the selenium commands.
- Understand about locators and how to use them.
- Create tests with little or no prior knowledge of automation.
- Create quick bug reproduction scripts.
- Save the test suite to various format and can also export to Selenium RC/Webdriver.
Selenium RC:
- Design the tests using more elaborate languages than Selenese.
- Understand the primitive structure of selenium tool.
Selenium Webdriver:
- Should be always given priority over Selenium RC excluding when the latter is only needed.
- Create robust and browser-based regression automation.
- Test dynamic webpages where elements changes constantly.
- Create customized test results.
Selenium Grid:
- Run test scripts across multiple browsers and operating systems simultaneously.
- Run a large test suite by distributing it across and save time.
Reference: Selenium Tool Suite.
Very useful information .. I know when to use which tool now :). Is more coming on selenium grid ?
ReplyDeleteThnx Saurabh! Sure, I would take Selenium Grid with other selenium stuff too, but later once I complete the basic ruby posts.
Delete