{"id":9839,"date":"2021-06-25T20:18:24","date_gmt":"2021-06-25T14:48:24","guid":{"rendered":"https:\/\/www.h2kinfosys.com\/blog\/?p=9839"},"modified":"2025-11-17T06:13:15","modified_gmt":"2025-11-17T11:13:15","slug":"selenium-grid","status":"publish","type":"post","link":"https:\/\/www.h2kinfosys.com\/blog\/selenium-grid\/","title":{"rendered":"Selenium Grid"},"content":{"rendered":"\n<p>Selenium Grid is a part of the selenium suite that specialises in running many tests across different browsers, operating systems and machines in parallel. This will be achieved by routing the commands of remote browser instances where a server acts as a hub. A user needs to configure the remote server acts as a hub a user has to configure in order to execute the tests.<\/p>\n\n\n\n<p>Selenium Grid uses a concept of hub node where only run the test on a single machine called hub, but the execution will be done on different machines called <strong>nodes<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>When to use selenium Grid?<\/strong><\/h2>\n\n\n\n<p>Generally, there are two reasons to use the Grid<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To run the tests against the multiple browsers, multiple versions of the browsers and also browsers running on\u00a0the various\u00a0operating systems.<\/li>\n\n\n\n<li>To reduce the time it takes for test suite to finish the test pass.<\/li>\n<\/ul>\n\n\n\n<p>Grid is used to complete the execution of the test pass quickly by using the multiple machines to run the tests in parallel. For large and long running test suites for performing large amount of data validation, this will be a important time saver by shortening the turnaround time we can boost the time spent on running the test suite.<\/p>\n\n\n\n<p>Grid is used to support running tests against the multiple runtime environments especially against different browsers in the same time. Consider an example, grid of virtual machines can be setup with each supporting a different browser that the application which is be tested should support.one can have a grid all of the same browser, type and version. Grid is flexible. The main functionalities are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It has central entry point for all tests.<\/li>\n\n\n\n<li>Management and control of the nodes where browser may run<\/li>\n\n\n\n<li>Scaling<\/li>\n\n\n\n<li>Running parallel tests<\/li>\n\n\n\n<li>Cross platform testing<\/li>\n\n\n\n<li>Load balancing<\/li>\n<\/ul>\n\n\n\n<p><a href=\"https:\/\/www.h2kinfosys.com\/blog\/selenium-grid\/\" class=\"rank-math-link\">Selenium grid<\/a> has to be used when we <strong>Run our tests against different browsers, operating systems and machines,<\/strong> all these at a same time. This ensures that the application you are testing is fully compatible with a wide range of browser OS combinations. <strong>Save time in the execution of your test suites<\/strong>, if Selenium Grid to run 4 tests at a time then we will finish the whole suite around 4 times faster.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Selenium Grid Architecture:<\/strong><\/h2>\n\n\n\n<p>Selenium Grid has a hub and node Architecture<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>The HUB<\/strong><\/h4>\n\n\n\n<p><strong><\/strong>The hub is central point where you load your tests into. There will be only one Hub in a grid. The hub is launched only on a single machine such as computer who\u2019s OS is windows 7 and browser is IE. The machine containing the hub is the place where the tests are run, but the browser being automated on the node is seen.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>The Nodes<\/strong><\/h4>\n\n\n\n<p>Nodes are Selenium instances which will execute the tests which are loaded in the hub. Nodes can be one or more in a grid.&nbsp;Nodes&nbsp;are often&nbsp;launched on multiple machines with different platforms and browsers. The machines running on the nodes need not be in the same platform as of the hub.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Selenium Grid is a part of the selenium suite that specialises in running many tests across different browsers, operating systems and machines in parallel. This will be achieved by routing the commands of remote browser instances where a server acts as a hub. A user needs to configure the remote server acts as a hub [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9841,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"class_list":["post-9839","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-selenium-tutorials"],"_links":{"self":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/9839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/comments?post=9839"}],"version-history":[{"count":1,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/9839\/revisions"}],"predecessor-version":[{"id":32022,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/9839\/revisions\/32022"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media\/9841"}],"wp:attachment":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media?parent=9839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/categories?post=9839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/tags?post=9839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}