diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a16a52..e39a20a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/). - **Zero-config first run: `selenium-boot.yml` is now optional** — with no default `selenium-boot.yml` in the working directory or on the classpath, the framework runs on built-in defaults (`browser.name: chrome`, `execution.mode: local`, `timeouts.explicit: 10`, `timeouts.pageLoad: 30`) and prints one `[Selenium Boot] No selenium-boot.yml found — running with built-in defaults ...` notice line. Fields a file omits (and an empty file) fall back to the same defaults; `browser.name` is only defaulted when `browser.matrix` is not set, and `SeleniumBootDefaults` overrides still take precedence over the built-ins. Nothing that was an error before stops being one: a requested profile (`-Dselenium.boot.profile`) or explicit path (`-Dselenium.boot.config`) whose file is missing still throws, so a typo never silently runs on defaults, and present-but-invalid values (an unknown `execution.mode`, a negative timeout) still fail validation. Adds `ConfigurationLoader.load(File, ClassLoader)` (working directory and classpath supplied, for tests). (#66) - **Terminal `Locator` actions wait for the element and re-resolve it on every poll** — `click()`, `type()`, `append()`, `getText()`, `getAttribute()`, `hover()`, `scrollIntoView()`, `jsClick()` and `element()` used to look the element up once and act on that cached reference, so a page that re-rendered it in between surfaced as a `StaleElementReferenceException`, and a locator that matched nothing yet threw immediately. They now resolve the locator from scratch on each poll, retrying on a stale or not-yet-present element until `timeouts.explicit` elapses. **Behavior change:** a locator that matches nothing is now retried for up to `timeouts.explicit` instead of failing at once. If it never matches, the call still ends in a `LocatorException` (cause: `TimeoutException`), so existing catches keep working; an element that exists but never becomes visible/clickable still times out with a `TimeoutException`, as before. `isVisible()`, `isHidden()`, `isEnabled()` and `count()` still never wait, and `rows()` inherits the wait for its table through `element()`. (#67, #68) -- **JUnit Jupiter API bumped 5.10.2 → 6.1.3** (`junit-jupiter-api`, optional dependency of the JUnit 5 bridge). `junit-platform-launcher` stays at 1.10.2, and that pairing has not been tested with JUnit 6 consumers: the consumer integration suite was run only against a project on JUnit 5.10.2 with launcher 1.10.2. If you run JUnit 6, verify your setup and report any problem. (#64) +- **JUnit Jupiter API bumped 5.10.2 → 6.1.3** (`junit-jupiter-api`, optional dependency of the JUnit 5 bridge). `junit-platform-launcher` is now bumped to match (6.1.3, was 1.10.2), closing the pairing gap left by #64. Verified both directions against the consumer integration suite (11/11 real-browser JUnit 5 tests): a consumer still on JUnit 5.10.2 + launcher 1.10.2 keeps working unchanged, and a consumer on JUnit 6 (jupiter 6.1.3 + launcher 6.1.3) now works too. (#64) ### v3.4.0 — 2026-09-19 diff --git a/README.md b/README.md index 31920ec..f828193 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Three files. Copy them as-is and `mvn test` goes green against a real Chrome. ``` -**2. `selenium-boot.yml`** — project root, next to `pom.xml`. This is the complete minimum; every key below is required. +**2. `selenium-boot.yml`** — optional; project root, next to `pom.xml`. Omit it entirely and the framework runs on built-in defaults (Chrome, local execution, 10s/30s timeouts). Shown below with every key set explicitly, but each one defaults if left out. ```yaml execution: @@ -149,7 +149,7 @@ It eliminates repetitive boilerplate by providing sensible defaults, a standardi Selenium Boot is **the Spring Boot of Java test automation** — and that positioning is deliberately layered: -1. **Opinionated core (primary).** Convention over configuration, zero boilerplate by default. Add one dependency, extend `BaseTest` / `BasePage`, and the framework has already made the sensible decisions — driver lifecycle, waits, retries, reporting, CI wiring. `selenium-boot.yml` stays short — a handful of required keys, and `SeleniumBootDefaults` covers the rest. +1. **Opinionated core (primary).** Convention over configuration, zero boilerplate by default. Add one dependency, extend `BaseTest` / `BasePage`, and the framework has already made the sensible decisions — driver lifecycle, waits, retries, reporting, CI wiring. `selenium-boot.yml` is optional and every key in it defaults — `SeleniumBootDefaults` and the framework's own built-ins cover the rest. 2. **Never hides Selenium (the constraint).** Unlike heavier abstractions, Selenium Boot never takes the raw `WebDriver` away from you. When the conventions don't fit, drop straight down to `WebDriver` / `By` / `WebElement`. Opinionated without being a cage. 3. **Extensible toolkit (the escape hatch).** An SPI/registry plugin system (`DriverProviderRegistry`, `PluginRegistry`, `ReportAdapterRegistry`) makes it modular for the power users who need it — serving the opinionated core, not replacing it. Most users never touch it. @@ -236,9 +236,10 @@ Also pin the compiler plugin and add Surefire so `mvn test` discovers TestNG tes --- -### Step 2: Create the Configuration File +### Step 2: Configuration File (optional) -Create `selenium-boot.yml` at your **project root** (same level as `pom.xml`): +`selenium-boot.yml` is optional — omit it to run on built-in defaults. Create it at your +**project root** (same level as `pom.xml`) when you want to change anything: ```yaml execution: diff --git a/docs-site/docs/cloud-execution.md b/docs-site/docs/cloud-execution.md index 02d42a0..41599de 100644 --- a/docs-site/docs/cloud-execution.md +++ b/docs-site/docs/cloud-execution.md @@ -49,14 +49,16 @@ execution: browserVersion: latest browser: - name: chrome # required by every selenium-boot.yml, distinct from browserstack.browser above + name: chrome # distinct from browserstack.browser above — set explicitly to avoid confusion timeouts: explicit: 10 pageLoad: 30 ``` -`browser` and `timeouts` are required top-level blocks for every `selenium-boot.yml` — see the [Configuration Reference](/docs/configuration). +`browser.name` and `timeouts` both default (`chrome`, 10s/30s) if omitted — see the +[Configuration Reference](/docs/configuration) — but set them explicitly here anyway, +since `browser.name` is easy to confuse with `browserstack.browser` above. Set environment variables before running: diff --git a/docs-site/docs/getting-started.md b/docs-site/docs/getting-started.md index 6d58bf5..a8994c4 100644 --- a/docs-site/docs/getting-started.md +++ b/docs-site/docs/getting-started.md @@ -76,9 +76,12 @@ See the full [Gradle Setup Guide](/docs/gradle) for parallel config, JUnit 5, op --- -## Step 2 — Create the configuration file +## Step 2 — Configuration file (optional) -Create `selenium-boot.yml` in your project root (next to `pom.xml` or `build.gradle`). +`selenium-boot.yml` is optional — with no file at all the framework runs on built-in +defaults (Chrome, local execution, 10 s / 30 s timeouts) and prints one notice line +saying so. Create it in your project root (next to `pom.xml` or `build.gradle`) when +you want to change anything, such as the `baseUrl` below. This example uses `https://example.com` — a stable real site reserved for documentation — so you can copy the files as-is and `mvn test` goes green. Swap in your own URL once it passes. @@ -101,9 +104,8 @@ timeouts: pageLoad: 30 ``` -Every field here is optional — anything you leave out falls back to a default (Chrome, local -execution, 10 s / 30 s timeouts), and with no file at all the framework runs on those defaults. -See the [configuration reference](configuration.md) for the full list. +Every field here is optional — anything you leave out falls back to a default, same as an +absent file. See the [configuration reference](configuration.md) for the full list. --- @@ -178,7 +180,7 @@ mvn test ## What happens -1. Framework loads `selenium-boot.yml` +1. Framework loads `selenium-boot.yml` (or built-in defaults if it's absent) 2. Chrome launches automatically 3. Your test runs 4. Screenshot captured on any failure @@ -196,7 +198,7 @@ mvn test ``` your-project/ ├── pom.xml -├── selenium-boot.yml +├── selenium-boot.yml # optional — omit to run on built-in defaults ├── testng.xml └── src/test/java/ └── SmokeTest.java @@ -208,7 +210,7 @@ your-project/ ``` your-project/ ├── build.gradle (or build.gradle.kts) -├── selenium-boot.yml +├── selenium-boot.yml # optional — omit to run on built-in defaults ├── testng.xml └── src/test/java/ └── SmokeTest.java diff --git a/docs-site/docs/gradle.md b/docs-site/docs/gradle.md index b4b4e58..0bdd776 100644 --- a/docs-site/docs/gradle.md +++ b/docs-site/docs/gradle.md @@ -144,9 +144,11 @@ tasks.test { --- -## Step 3 — Configuration file +## Step 3 — Configuration file (optional) -Create `selenium-boot.yml` at the **project root** (same level as `build.gradle`): +`selenium-boot.yml` is optional — omit it entirely to run on built-in defaults (Chrome, +local execution, 10 s / 30 s timeouts). Create it at the **project root** (same level as +`build.gradle`) when you want to change anything: ```yaml title="selenium-boot.yml" execution: diff --git a/docs-site/docs/guides/parallel.md b/docs-site/docs/guides/parallel.md index 03b181d..8a7b169 100644 --- a/docs-site/docs/guides/parallel.md +++ b/docs-site/docs/guides/parallel.md @@ -29,7 +29,7 @@ timeouts: pageLoad: 30 ``` -`parallel`, `threadCount` and `maxActiveSessions` all live under `execution:` — see the [Configuration Reference](/docs/configuration#execution). `timeouts.explicit` and `timeouts.pageLoad` are required by every `selenium-boot.yml`, parallel or not. +`parallel`, `threadCount` and `maxActiveSessions` all live under `execution:` — see the [Configuration Reference](/docs/configuration#execution). `timeouts.explicit` and `timeouts.pageLoad` default to 10s/30s if omitted, parallel or not — set them explicitly here only if you want different values. `maxActiveSessions` acts as a hard ceiling on concurrent browsers. If `threadCount` is 4 but `maxActiveSessions` is 2, at most 2 browsers will run at the same time. diff --git a/docs-site/docs/junit5.md b/docs-site/docs/junit5.md index 20e58f4..dbc7364 100644 --- a/docs-site/docs/junit5.md +++ b/docs-site/docs/junit5.md @@ -36,6 +36,10 @@ Selenium Boot supports both **TestNG** (built-in) and **JUnit 5** (opt-in). The No extra Surefire configuration needed — Maven Surefire 3.x auto-detects JUnit 5. +:::info JUnit 6 +Also works on JUnit 6 — use `junit-jupiter:6.1.3` and `junit-platform-launcher:6.1.3` instead of the 5.10.2/1.10.2 versions above. Both pairings are verified against the consumer integration suite. +::: + --- ## Option A — Extend `BaseJUnit5Test` diff --git a/docs-site/docs/migration/from-selenium-testng.md b/docs-site/docs/migration/from-selenium-testng.md index e6b4c33..972f483 100644 --- a/docs-site/docs/migration/from-selenium-testng.md +++ b/docs-site/docs/migration/from-selenium-testng.md @@ -32,7 +32,9 @@ Remove your Selenium, WebDriverManager, and reporting dependencies and add one: Selenium Boot brings Selenium (and TestNG) transitively. You no longer declare `selenium-java`, `webdrivermanager`, or a reporting library yourself. -Then create a small [`selenium-boot.yml`](/docs/configuration) — see [config mapping](#config-mapping) below. +`selenium-boot.yml` is optional — omit it to run on built-in defaults — but since you're +migrating existing settings, create a small [`selenium-boot.yml`](/docs/configuration) to +carry them over; see [config mapping](#config-mapping) below. --- diff --git a/pom.xml b/pom.xml index 1246143..4880659 100644 --- a/pom.xml +++ b/pom.xml @@ -101,7 +101,7 @@ org.junit.platform junit-platform-launcher - 1.10.2 + 6.1.3 true