What is Selenium?

 

What Is Selenium?

Selenium is an open-source tool that is used for automating the tests carried out on web browsers (Web applications are tested using any web browser).

Wait, before you get carried away, let me re-iterate that, only testing of web applications is possible with Selenium. We can neither test any desktop (software) application nor test any mobile application using Selenium. know more at Selenium online training

It’ a bummer right? I can feel your pain. But don’t worry, there are many tools for testing software and mobile applications like: IBM’s RFT, HP’s QPT, Appium and many more. But, the focus of this blog is, testing dynamic web applications and why Selenium is the best for that purpose.

What are the advantages of Selenium?

Since Selenium is open-source, there is no licensing cost involved, which is a major advantage over other testing tools. Other reasons behind Selenium’s ever growing popularity are:

Selenium WebDriver

Also known as Selenium 2.0, WebDriver executes test scripts through browser-specific drivers. It consists of:

API

Application Programming Interface. Ports test scripts you write in Ruby, Java, Python, or C# to Selenese (Selenium’s own scripting language), through bindings.

Library

Houses the API and language-specific bindings. Although plenty of third-party bindings exist to support different programming languages, the core client-side bindings supported by the main project are: Selenium Java (as selenium jar files), Selenium Ruby, Selenium dotnet (or Selenium C#, available as .dll files), Selenium Python, and Selenium JavaScript (Node).

Driver

Executable module that opens up a browser instance and runs the test script. Browser-specific—for instance, Google develops and maintains Chromedriver for Selenium to support automation on Chromium/Chrome.

Framework

Support libraries for integration with natural or programming language test frameworks, like Selenium with Cucumber or Selenium with TestNG.

Selenium Grid

The Grid can minimize test runtime—by executing multiple test scripts on any number of remote devices at once. This is called parallel testing.

Selenium Grid is a smart server that routes test commands to browser instances on remote devices. The two main components needed for this (other than the test script from client-side/tester) are:

The ‘Hub’ (server):

Accepts access requests from WebDriver client. Routes JSON test commands to remote drivers on registered ‘nodes’.

Selenium IDE

Selenium IDE is a Chrome and Firefox plugin that can log ‘natural’ interactions in the browser and generate its code in programming languages like C#, Java, Python, and Ruby, as well as Selenese (Selenium’s own scripting language). know more at Selenium training

Testers can enable ‘recording’ within the IDE and ‘play out’ the test scenario on the browser. The IDE can then replay those interactions and highlight any errors (during replay) in red.

Why do I need Selenium Automation Testing?

Imagine that a manual tester has this scenario: Checking whether the web app’s signup page (www.example.com/signup) validates input strings and registers a user successfully in latest versions of Chrome and Firefox, on Windows 7.

Assume that the signup page has these input fields—username, email address, and password. The tester will get a Windows 7 desktop and follow these steps, consecutively, on latest versions of Chrome and Firefox:

  1. Enter the URL in the address bar (www.example.com/signup)
  2. Enter an invalid string in each input field (email, username, and password)
  3. Check whether the input strings were validated against corresponding regexes and any pre-existing values in the database
  4. Enter ‘valid’ strings in each input field; click Sign Up
  5. Check whether “Welcome, ‘{‘username’}’“ page showed up
  6. Check whether the system database created a new userID for ‘{‘username’}’
  7. Mark the test ‘passed’ if it did, ‘failed’ if the signup feature broke anywhere during the test. know more at Selenium online course
  8. Depending on the number of manual testers (and thoroughness of test cases), it may take anywhere between hours to weeks to be sure that the web app is fully functional.

    Modern developers and product teams don’t have that kind of time to allot for testing, but they can’t set aside exhaustive testing in a hurry to release either. This is why they super-charge their testing with automation, powered by Selenium.

Comments

Popular posts from this blog

What is Azure?

SharePoint Interview Questions

Selenium Interview Questions