Selenium GRID

Selenium testing automation is the pre-eminent open source software test automation system in the world of testing. Part of the rise in popularity of selenium was the addition of Selenium grid which allows for parallel test case execution, thus significantly reducing time for regression. In addition, selenium grid enables multiple parallel environments to be simultaneously tested. This article starts with a short overview of selenium and then dives into depths of Selenium Grid.

Overview of Selenium

The first automation tool that comes into our mind when we listen to the word “Automation” is “Selenium”. It is the most widely used automation testing tool for testing web-based applications.

The organizations want to shorten the test suite automation cycle duration, and Selenium GRID is architectured to address this core problem. Webomates CQ framework supports distributed execution while using advanced elastic features in AWS and exhibits AI-based reporting. Webomates has a patented technology for multi channel testing, which reduces the test suite execution time immensely while getting maximum code coverage.

Selenium is a free/open Source Automation testing suite for testing web applications. It was developed by ‘Jason Huggins’ in 2004.

Selenium is a software suite with following components:

Selenium IDESelenium RC (Remote Control)Selenium WebDriverSelenium GRID

Selenium IDE: Selenium IDE enables the browser for record and playback. It is supported only on the Firefox browser.

Selenium RC (Remote Control): It resolves JavaScript’s ‘Same Origin Policy Issue’ and is a server that acts as an HTTP proxy and enables the browser to believe that Selenium Core and the web application come from the same domain.

WebDriver: it is a cross-Platform testing framework that can control the browser from OS Level. It is supported by multiple browsers, Chrome, Internet Explorer, Firefox, etc.

Selenium GRID: Selenium GRID was developed by Patrick Lightbody. Initially, he named it “Hosted QA”. It was primarily developed for minimizing the test execution time. Its architecture (hub-node model) enables the user to run multiple test cases simultaneously in a distributed environment (on nodes). This is mainly used by organizations having needs to execute large regression suites on the cross-platform environment on a recurring basis.

Now that we have seen a quick overview of Selenium, let’s explore more about Selenium GRID. Selenium GRID is a feature of Selenium, that allows running test cases in parallel. It is a network of connected test case execution machines. Further, it enables running test cases on different Operating systems, browsers, configurations, etc. based on the application and requirement. Selenium GRID reduces the time of test execution multi-fold. It is based on a distributed (Hub-Node) model.

Benefits of using Selenium GRIDSelenium GRID Architecture

Following diagram represents Selenium GRID architecture.

Grid Composition

Hub: Orchestrator/Master/Central Point of test cases. There is only one Hub in a GRID. It communicates and orchestrates test execution on all nodes simultaneously.

Node: Any test machine that is added to the hub, that performs test executed based on a command from Hub. Nodes run their Selenium Browser Drivers. Nodes are Independent of each other.

Execution: To run test scripts on the Grid, one should use the DesiredCapabilities and the RemoteWebDriver objects.

DesiredCapabilites is used to set the test node configurations like browser/version and OS/version that we will be used in automationRemoteWebDriver is used to set which node (or machine) that our test will run against.

While executing test cases locally, the WebDriver client libraries talk to theWeb Browser Driver directly. Now, when you try to execute your tests remotely, the WebDriver client libraries talk to the RemoteWebDriverserver and the server talks to either the Firefox Driver, IE Driver, or Chrome Driver, whichever the WebDriver client asks for.Read for more : selenium testing automation

More Details : https://www.webomates.com/blog/automation-testing/selenium-grid/