Software Engineering | Selenium: An Automation tool

Selenium is an automation tool and portable software testing tool for web applications. A test domain-specific language is also provided, to write test cases one can use programming languages, including C#, Java, Perl, PHP, Python, Ruby, Scala, Groovy. It does not support RIA(Rich Internet Application) Technology such as Silverlight JavaFX and Flex\Flash. Selenium is not a single tool. It is a product suite of software consisting of following components:
selenium automation tools

History: Selenium was developed by Jason Huggins in 2004 at ThoughtWorks. He was working on an internal/web application at ThoughtWorks after some time he noticed that instead of testing his application manually, he can automate his testing. He developed a JavaScript program to test his web application, allowing him to automatically rerun tests. He called his program as “JavaScriptTestRunner”. After some time this tool was open sourced and renamed as Selenium Core.
Selenium Remote Control was developed by Paul Hammant. The reason behind developing Selenium RC was testers who are using Selenium core had to install the whole application under test and the web server on their local computers because there were some restrictions forced by the same origin policy. To overcome this restriction Paul Hammant came to a decision and developed a server which will act as an HTTP proxy to trick the web browser, so that thinks that Selenium Core and the web application being tested came from the same domain.
Selenium IDE was developed by Shinya Kasatani of Japan. It was implemented as a Firefox add-on/plugin and now we can use Selenium IDE on every web browser. He gave Selenium IDE to the Selenium project in 2006.
Selenium Grid was developed by Philippe Hanrigou in 2008. It is a server that allows the test to use web browser instance running on remote machines. It provides an ability to run the test on a remote web browser, which helps to divide a load of testing across multiple machines and it will save enormous time. It allows executing parallel test across different platforms and operating system. Grid provided, as open source, a similar capability to the private Google cloud for Selenium RC. Pat Lightbody had already made a private cloud system named as “HostedQA” and sold it to Gomez, Inc.
Selenium WebDriver was developed by Simon Stewart in 2006. WebDriver automates and controls initiated by the web browser. It does not rely on JavaScript for automation. It controls the browser directly by communicating with it. It was the first cross-platform testing framework that could control the browser from the OS level.
In 2009, after a meeting whole Selenium team decided to merge the two projects Selenium RC and WebDriver, and call it as Selenium 2.0.

Selenium IDE: At beginning Selenium IDE( Integrated Development Environment ) was implemented as a Firefox add-on/plugin and now it can be use Selenium IDE on every web browser. It provides record and playback functionality. The figure shows Selenium IDE.
selenium ide



Pros:

  • It is an open-source tool.
  • Provide base, for extensions.
  • It provides multi-browser support.
  • No programming language experience required while using Selenium IDE.
  • The user can set breakpoints and debug.
  • It provides record and playback functions.

Cons:

  • There are no support iteration and conditional operations.
  • Execution is slow.
  • It does not have any API.
  • It does not provide any mechanism for error handling.

Selenium RC: RC stands for Remote Control. It allows the programmers to code in different programming languages like C#, Java, Perl, PHP, Python, Ruby, Scala, Groovy. The figure shows how Remote Control Server works.
s

Pros:

  • It supports all web browsers.
  • It can perform iteration and conditional operations.
  • Execution is faster as compared to IDE.
  • It has built-in test result generators.
  • It supports data-driven testing.
  • It has a matured and complete API.

Cons:

  • Programming language knowledge is needed.
  • It does not support testing for IOS/Android.
  • It is a little slower then Selenium Webdriver in terms of execution.
  • It does not support record and playback functions.
  • Complicated configuration.

Selenium Web Driver: Selenium Web Driver automates and controls initiated by the web browser. It does not rely on JavaScript for automation. It controls the browser directly by communicating with it. The figure shows how web driver works as an interface between Drivers and Bindings
selenium web driver

Pros:

  • It directly communicates with web-browser.
  • Execution is faster.
  • It supports listeners.
  • It supports IOS/Android application testing.
  • Installation is simpler than Selenium RC.
  • Purely object-oriented.

Cons:

  • It requires programming knowledge.
  • There’s no built-in mechanism of generation of test result file.

Selenium Grid: Basically, it is a server that allows the test to use web browser instance running on remote machines. It provides an ability to run the test on a remote web browser, which helps to divide a load of testing across multiple machines and it will save enormous time. It allows executing parallel test across different platforms and operating system.
selenium grid
Selenium Grid is a network of HUB & nodes. Each node registers to the HUB with a certain configuration and HUB is aware of the browsers available on the node. When a request comes to the HUB for a specific browser [with desired capabilities object], the HUB, if found a match for the requested web browser, redirects the call to that particular Grid Node and then a session is established bi-directionally and execution starts.



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

3


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.