lecture 12 of 160 completed

Selenium Grid: running tests on other machines

Grid is Selenium's answer to scale and to browser coverage you cannot get locally. Every Selenium interview asks about it.

What you'll learn

  • What the hub and node model does
  • What Grid buys, and what it costs
  • Why independent tests are a precondition

Your suite takes ninety minutes on one machine. You need to test Safari, and your team is on Windows. Both problems have the same answer.

Grid runs your tests on other machines. Your test code stays where it is and sends its commands to a Grid, which passes them to a browser somewhere else. Because everything already travels over the WebDriver protocol, sending it to another machine changes almost nothing in your code.

Two parts:

The Hub receives requests and decides where each one goes.

Nodes are machines that actually run browsers. A Windows node with Edge, a Mac node with Safari, several Linux nodes with Chrome.

members only

Keep reading with the full course

The Foundations track and the first 5 lectures of each framework are free. This lecture is part of the paid course, which unlocks every lecture, all three frameworks, and downloads.

See the options →