Implementation:SeleniumHQ Selenium Bazel Build Grid
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Distributed_Testing, Build_Systems, Selenium_Grid |
| Last Updated | 2026-02-11 00:00 GMT |
Overview
External tool documentation for building the Selenium Grid server JAR using Bazel.
Description
The Grid server is built using the Bazel target //java/src/org/openqa/selenium/grid:executable-grid. This target compiles all Grid Java modules and packages them into a self-contained executable JAR. The shorthand bazel build grid can also be used via the project's Bazel configuration.
Usage
Run the build command when you need a local Grid server binary, either for testing Grid changes or for creating custom Grid deployments.
Code Reference
Source Location
- Repository: Selenium
- File: java/src/org/openqa/selenium/grid/ (BUILD.bazel)
Signature
# Build the Grid server
bazel build //java/src/org/openqa/selenium/grid:executable-grid
# Or using the shorthand
bazel build grid
# With release configuration (optional)
bazel build --config=release //java/src/org/openqa/selenium/grid:executable-grid
Import
N/A - External build tool command
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| Bazel target | String | Yes | Build label: //java/src/org/openqa/selenium/grid:executable-grid |
| --config | String | No | Build configuration (e.g., "release") |
| --pin_browsers | Flag | No | Pin browser/driver versions |
Outputs
| Name | Type | Description |
|---|---|---|
| selenium-server.jar | File | Executable fat JAR in bazel-bin/ |
Usage Examples
Build and Run
# Build
bazel build //java/src/org/openqa/selenium/grid:executable-grid
# Run standalone
java -jar bazel-bin/java/src/org/openqa/selenium/grid/selenium-server-*.jar standalone
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment