🔗 Ecosystem — TestNG, Maven, Jenkins, Grid
Ecosystem — TestNG, Maven, Jenkins, Grid: Think of the Selenium ecosystem as a restaurant kitchen: on its own, Selenium is only the knife — it knows how to cut, but not how to ta
Think of the Selenium ecosystem as a restaurant kitchen: on its own, Selenium is only the knife — it knows how to cut, but not how to take orders, source ingredients, or get plates out to the floor. Maven is the supplier, TestNG is the chef sequencing the line, Jenkins is the service belt carrying orders into the kitchen continuously, and Grid is twenty stoves running side by side instead of one. Concretely: the Selenium ecosystem is the Java development toolchain ported to test automation: Maven handles dependency management (you add selenium-java to pom.xml), TestNG manages the test lifecycle with @BeforeMethod/@AfterMethod — the direct equivalent of JUnit's @BeforeEach/@AfterEach — Jenkins triggers tests on every commit as the CI server, and Selenium Grid extends JUnit's parallel runner into the browser dimension. So if Selenium already runs on a single machine, why bother adding Grid? Because 200 E2E tests executed serially on one Node can block the CI pipeline for 40–60 minutes; with Grid, those same tests are distributed across 20 parallel Nodes and finish in 3–4 minutes. For a QA team, this gap is culturally decisive: when a Jenkins job takes 60 minutes, developers stop waiting for results and stack commit on commit, bugs accumulate, and the test report becomes noise nobody reads — a fast feedback loop is the survival condition for a healthy test culture.
Selenium Grid — Parallel & Remote Tests
Terminal — Selenium Grid 4
Step by Step: Which Starts First, the Hub or the Node?
The Hub is started FIRST
`java -jar selenium-server.jar hub` starts the COORDINATOR process listening on `localhost:4444` — no Node is connected YET.
The Node REGISTERS with the Hub
A Node started with `--hub http://localhost:4444` announces its browser CAPABILITIES (Chrome, Firefox versions) to the Hub at startup.
The Hub keeps a REGISTRY
The Hub TRACKS every connected Node and its current OCCUPANCY (how many sessions are open, how many slots are free) in a table.
What if the order is reversed?
If a Node tries to start while the Hub is NOT yet up, it throws a connection error — this is why CI scripts add a short WAIT step for the Hub to come up first.
Java — RemoteWebDriver
Micro Lab: Selenium Grid — Parallel testing