Overview of Selenium Grid

Last updated on Dec 02 2021
Manikaran Reddy

Table of Contents

Overview of Selenium Grid

• Selenium Grid may be a feature in Selenium that permits you to run test cases in several machines across different platforms. The control of triggering the test cases is on the local machine, and when the test cases are triggered, they’re automatically executed by the remote machine. Suppose you’ve got 5 test cases. Your local machine is running multiple applications, so you would like to run your test cases during a remote machine. you would like to configure the remote server in order that the test cases are often executed there.
• It supports distributed test execution. Initially, you’ve got an area machine where you write the test cases and executes on an equivalent machine. However, during a big organization, you’ve got multiple test cases, and it isn’t possible to run all the test cases within the same machine. during a large organization, you’ve got multiple servers, so local machine distributes the test cases across different machines/servers.
• You also can run the test cases in parallel in multiple machines on Selenium Grid.

Architecture of Selenium Grid

Selenium Web Driver
Selenium Web Driver

Hub
• A Hub may be a central point or an area machine that receives all the test requests and distributes them to the proper nodes. The machine which actually triggers the test suit referred to as Hub
• There are often just one hub during a selenium grid.
• The machine which is containing the hub triggers the test suit , but you’ll see the browser being automated on other machines.
Node
Nodes are the selenium instances which can execute the test cases that you simply loaded on the hub. Nodes are often launched on multiple machines with different platforms and browsers.
Note: once you are configuring nodes, you’re running the test cases in several platforms. there’s no rule that if your hub is running the test in windows, then all nodes must be executing the test cases in windows only. The nodes can have different platforms like Safari on MAC, Firefox on Ubuntu, Internet Explorer on WinXP, Android.

Why Selenium Grid?

Selenium Grid is beneficial due to the subsequent reasons:
• Run on different platforms: you’ll run the test cases in several platforms, so it’s a platform independent. for instance , you’ve got a hub which has internet explorer 9. Hub has internet explorer 9 as many older websites support IE 9. Now we would like to run the test cases in several platform like Internet Explorer. As we all know that just one version of a browser are often installed on a computer. you would like to configure the node to which you would like to send your test cases.
• Parallel execution: If you found out the Selenium Grid, you’ll run the multiple cases at an equivalent time. this protects time in running the test suites.
How to found out Selenium Grid

Selenium Web Driver
Selenium Web Driver

• Download the Selenium Standalone Server to run Remote Selenium webdriver. it’s available during a single jar file.

• Store the jar file at any of the drive.
• Open the cmd.
• Register the hub through cmd. Enter the command java -jar selenium-server-standalone-3.8.1.jar -role hub. This command will treat the machine as a hub.

Selenium Web Driver
Selenium Web Driver

From the above screen, we observe that the address of hub is http://192.168.1.12:4444/grid/register. The port number is 4444 where hub resides and that we got to register the hub with these nodes.
• Open the link, i.e., http://192.168.1.12:4444/grid/console where the server resides. Hub is that the server only.

Selenium Web Driver
Selenium Web Driver

The above screen shows that the hub has been created, but it doesn’t create anything as a hub isn’t registered with the nodes. Now we’d like to register the nodes with the hub.
• Log in to a different machine and register it as a node for a hub. i will be able to remotely connect my machine to a different machine through Teamviewer. To register the node together with your hub, you’ll roll in the hay from the node machine only not from your machine, so I connect my machine to a different machine. during a node machine, run the command “java -jar selenium-server-standalone-3.141.59.jar role webdriver -hub >ipaddress>/grid/register -port 5566”.
• Now if we would like to run the test cases during a Google chrome or Firefox browser, then we’d like to download the chrome driver or geekodriver during a node machine. so as to realize this, we’d like to run the subsequent command during a node machine:
“java -Dwebdriver.chrome.driver=”D:\chromedriver.exe” -jar selenium-server-standalone-3.141.59.jar role webdriver -hub >ipaddress>/grid/register -port 5566″
Where, D stands for parameters from the instruction . If you place D, then command assumes that it’s given one parameter and wish to require care while running the test cases. it’s mandatory to possess exe file of a browser. Without exe file, we cannot run the selenium test cases.
Note: Both the Selenium Standalone server and exe file must be within the same path.
So, this brings us to the end of blog. This Tecklearn ‘Overview of Selenium Grid’ blog helps you with commonly asked questions if you are looking out for a job in Selenium and Automation Testing. If you wish to learn Selenium and build a career in Automation Testing domain, then check out our interactive, Selenium Certification Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

https://www.tecklearn.com/course/selenium-training-certification/

Selenium Certification Training

About the Course

Tecklearn’s Selenium Certification Training enables you to master the complete Selenium suite. The Selenium Training is designed to train developers and manual testers to learn how to automate web applications with a robust framework, and integrate it within the DevOps processes of an organization. This Selenium Certification Training will also help you master important concepts such as TestNG, Selenium IDE, Selenium Grid, Selenium WebDriver, etc. Get hands-on experience on widely used automation frameworks such as Data-Driven Framework, Keyword-Driven Framework, Hybrid Framework, and Behavior Driven Development (BDD) Framework. Throughout this online Instructor-led Selenium Certification Training, you will be working on real-life industry use cases.

Why Should you take Selenium Certification Training?

• The average salary of a Selenium Test Automation Engineer is $94k per year – Indeed.com.
• Automation Testing Market is expected to grow at a Compound Annual Growth Rate (CAGR) of 18.0% in the next three years.
• Global software testing market to reach $50 billion by 2020 – NASSCOM. Selenium tool supports more browsers and languages than any other testing tool.

What you will Learn in this Course?

Getting started with Selenium
• Introduction to Selenium testing
• Significance of automation testing
• Comparison of Manual and Automation Testing
• Installation of Java JDK, JRE and Eclipse
Setting the environment in Eclipse for Selenium
• Java Introduction
• Creating a Java function and executing
• Concepts of Java
• Properties File
• Reading Data from Excel File
• Database Connection
• Hands On
Advantages of Selenium automation testing
• Selenium Features
• Concept of Selenium Integrated Development Environment
• Understanding of the Selenium IDE features
• Addition of Script assertions and general commands
• Deploying the first Selenium Script
• Sample project IDE
• Recording Selenium test case
• Hands On
Selenium Web driver Automation
• Architecture of Selenium Web Driver
• Download and installation
• Creating a Java function using Selenium and execution
• Hands On
Deploying Web Drivers for scripting
• Getting the HTML source of Web Element
• Table and Form Elements
• Firebug extension and Fire Path installation
• Advance User Interactions and Cross Browser Testing
• Hands On
Deep dive into Selenium Web Driver
• Action Commands
• Web Table / Date Picker
• How to Implement Switching Commands in WebDriver
• Alerts
• Frames
• Hands On
Switching Operations in WebDriver using Window
• Selenium Web driver Wait
• Implicit wait, Explicit wait
• Deploying searching elements using the link text, name, using XPath
• Calendar
• Hands On
Introduction to TestNG Framework
• Introduction to TestNG
• Advantages of TestNG
• Installing TestNG on Eclipse
• Rules to write TestNG
• TestNG Features
• Annotations
• Grouping
• Sequencing: Prioritization and Dependency
• Enable/Disable a test case
• Parameterization: Using Xml file and Data Provider
• Parallel Testing & Cross Browser Testing
• TestNG Report: HTML Report, Console Report, XML Report
JUnit Operations and Test Framework
• Annotations, Methods in JUnit
• Junit Test Suites, ANT Build and JUNIT reporting
• Types of Test Automation Framework
• Module Based Testing Framework
• Data Driven Testing Framework
• Keyword Driven Testing Framework
• Hybrid Driven Testing Framework
• How to implement Testing Framework in Project
Object Repository
• Understanding of Object Repository
• Learning sample scripts using object repository
• Page Object Modelling
• Page Factory
JavaScript Functions
• Autosuggestion
• Headless Browser
• Sikuli
• XPath

Got a question for us? Please mention it in the comments section and we will get back to you.

0 responses on "Overview of Selenium Grid"

Leave a Message

Your email address will not be published. Required fields are marked *