Migrate remaining grid management functionality from Selenium-Foundation
selenium-grid-manager 36.0.0 Release Notes
Breaking Changes
Removed APIs
ServerProcessKiller— shutdown now handled by sidecar infrastructureLocalSeleniumGrid.LocalGridServernested class — promoted to top-levelLocalGridServerclass; references must be updatedIGridServerFactoryregistration inGridManagerPluginImplAbstractAppiumPlugin.appiumWithPM2()— PM2 is now unconditionally required for AppiumServletContainer.main(),getDependencyContexts(),getServletArgs()—ServletContaineris now a pure utility classServletFlags— no longer needed
Changed APIs
ManagedDriverPlugin.create()—int hubPortparameter addedAppiumGridServer— promoted from nested class to top-level class incorepackageLocalGridServer— promoted from nested class to top-level class incorepackageCommandLine-based process launching replaced withProcessBuilderthroughoutAbstractAppiumPluginrefactored — shared logic extracted toAppiumPluginBase;findNPMBinary()andfindPM2Binary()moved toNodeBinaryFinder
Moved Assets
- Hub/node configuration templates moved from
selenium-foundationtoselenium-grid-managerresources FoundationSlotMatchermoved fromselenium-foundationtoselenium-grid-managerGridConfigFactory/GridConfigFactoryImpl— config file generation moved fromselenium-foundation
New Features
Sidecar Servlet Infrastructure
A complete lifecycle management and monitoring solution for local Selenium Grid instances:
SidecarManager— starts and manages the sidecar servlet container; automatically launched when a local Grid collection is createdSidecarClient— HTTP client for communicating with the sidecar registration and shutdown endpointsSidecarDashboard— standalone dashboard entry point; launched via./gradlew runSidecar- Management console — available at
http://localhost:9001/grid/control/console; displays managed and discovered Grid instances with shutdown controls, scan progress, and example site link
Sidecar Servlets
| Servlet | Endpoint | Description |
|---|---|---|
RegistrationServlet |
POST /grid/control/register |
Registers a Grid server with the sidecar |
DeregistrationServlet |
POST /grid/control/deregister |
Removes a Grid collection from the registry |
ShutdownServlet |
POST /grid/control/shutdown |
Shuts down a managed Grid collection |
StopServlet |
POST /grid/control/stop |
Shuts down all managed collections and stops the sidecar |
StatusServlet |
GET /grid/control/status |
Returns JSON status of all managed and discovered instances |
ConsoleServlet |
GET /grid/control/console |
Serves the HTML management console |
Shutdown Strategies
Shutdown is now handled by the sidecar using the appropriate strategy for each server type:
LifecycleShutdownStrategy— Selenium 3 hub and node servers viaLifecycleServletGETPM2ShutdownStrategy— Appium servers viapm2 delete appium-<port>PidShutdownStrategy— Selenium 4 servers viaProcessHandle.destroy()(S4) or command-linekill/taskkill(S3)
Auth Strategies
TokenSessionAuthStrategy— token + session cookie authentication for browser clientsOsUserAuthStrategy— OS user identity authentication for CLI clients (S4 only; S3 logs a warning)DefaultSidecarAuthStrategy— chains both strategies
Grid Registry
GridRegistry— central registry for all managed Grid server registrations, grouped by hub port; owns the background scannerGridInstanceScanner— background scanner that discovers unmanaged Grid instances by probing a configurable port range in time-limited chunks; supports fine-toothed (step=1) scanning on demand
Port Allocation
GridPortAllocationStrategy— interface for hub port allocationDefaultGridPortAllocationStrategy— allocates port bundles (hub, pub, sub) using simultaneousServerSocketreservationGridHubPortAllocator— static facade; resolves strategy viaGRID_PORT_ALLOCATORsetting at class load time
Configuration File Generation
GridConfigFactory— interface for version-specific Grid configuration file generationGridConfigFactoryImpl(S3/S4) — version-specific implementations; call sites useGridConfigFactoryImpl.INSTANCE
Additional Improvements
ProxyListServlet— Selenium 3 hub servlet providing programmatic JSON node enumeration; added to hub config unconditionally as the hub-side counterpart toLifecycleServleton nodesAppiumGridServer.isActive()— uses/statusendpoint for Appium 2.x compatibilityLocalSeleniumGrid.isActive()— override checks all node servers, not just the hub- Example page site — now hosted by the sidecar for both Selenium 3 and Selenium 4, eliminating version-specific hosting behavior and hardcoded port conflicts
- JVM shutdown hook — registered in
SidecarManager.ensureRunning()to callGridRegistry.shutdownAll()on JVM exit, ensuring clean cleanup even when tests fail catastrophically SidecarSupport—ServiceLoader-based interface for version-specific Jetty servlet container lifecycle management