Cloud Execution
Selenium Boot supports running your test suite on BrowserStack and Sauce Labs with zero test-code changes. Switch from local Chrome to a cloud browser farm by changing one line in selenium-boot.yml.
How it works
All four execution modes share the same driver lifecycle — tests use getDriver(), open(), $(), and assertThat() identically regardless of where the browser runs. The framework picks the right provider based on execution.mode.
| Mode | Where it runs |
|---|---|
local | Your machine — Chrome or Firefox via Selenium Manager |
remote | Your own Selenium Grid / Selenoid / Moon |
browserstack | BrowserStack Automate cloud |
saucelabs | Sauce Labs cloud |
BrowserStack
Prerequisites
- Sign up at browserstack.com
- Go to Automate → Access Key — copy your username and access key
Config
execution:
mode: browserstack
browserstack:
username: ${BS_USER} # set as env var or inline
accessKey: ${BS_KEY}
os: Windows
osVersion: "11"
browser: chrome
browserVersion: latest
Set environment variables before running:
export BS_USER=your_username
export BS_KEY=your_access_key
mvn test
Desktop browsers
execution:
mode: browserstack
browserstack:
username: ${BS_USER}
accessKey: ${BS_KEY}
os: Windows # Windows | OS X
osVersion: "11" # 11 | 10 | Sonoma | Ventura | …
browser: chrome # chrome | firefox | edge | safari
browserVersion: latest # latest | 120.0 | 119.0 | …
Mobile devices
execution:
mode: browserstack
browserstack:
username: ${BS_USER}
accessKey: ${BS_KEY}
browser: chrome
device: "Samsung Galaxy S23"
realMobile: true
Raw capability overrides
Any key under capabilities is merged into bstack:options:
execution:
mode: browserstack
browserstack:
username: ${BS_USER}
accessKey: ${BS_KEY}
os: Windows
osVersion: "11"
browser: chrome
capabilities:
debug: true
networkLogs: true
consoleLogs: verbose
video: true
Session link in HTML report
After each test, the BrowserStack session URL is captured automatically. A ☁ View Session link appears in the test detail panel — click it to open the BrowserStack dashboard with video, network logs, and console output for that specific test run.
Sauce Labs
Prerequisites
- Sign up at saucelabs.com
- Go to Account → User Settings → copy your username and access key
Config
execution:
mode: saucelabs
saucelabs:
username: ${SAUCE_USER}
accessKey: ${SAUCE_KEY}
region: us-west-1 # us-west-1 | eu-central | apac-southeast
platformName: "Windows 11"
browser: chrome
browserVersion: latest