v0.7.0 – Browser Lifecycle Control
What's New in 0.7.0
🌐 Browser Lifecycle Control
Control when the WebDriver session is closed — one config line in selenium-boot.yml:
browser:
lifecycle: per-suite # per-test (default) | per-suiteper-test (default — existing behaviour)
Browser opens and closes for every test method. Full isolation, higher startup cost.
per-suite
Browser opens once per thread and stays alive for the entire suite.
Closed cleanly at suite end. Saves significant time on large sequential suites
where browser startup is a bottleneck.
Screenshots on failure still work — the browser is alive when the screenshot is taken.
Retry still works — the same browser is reused on retry, no restart needed.
Parallel-safe — each thread manages its own browser instance independently.
Notes for per-suite users
The browser retains state (cookies, URL, localStorage) from the previous test.
Reset state explicitly if your tests are independent:
@Test
public void myTest() {
open(); // navigates to baseUrl — resets the page
}
Or rely on state intentionally for dependent test flows:
@Test(priority = 1)
public void login() { ... } // authenticates once
@Test(priority = 2, dependsOnMethods = "login")
public void dashboard() { ... } // reuses the session — no login overhead
Dependency
<dependency>
<groupId>io.github.seleniumboot</groupId>
<artifactId>selenium-boot</artifactId>
<version>0.7.0</version>
</dependency>