The Java/Selenium counterpart to the Playwright framework: Java 21, Selenium 4, TestNG, Docker Grid, typed configuration, explicit waits, redaction-aware Allure diagnostics, and multi-browser CI for teams that still need JVM browser automation patterns.
This repo intentionally targets one controlled demo app. It demonstrates framework ownership, Grid-safe execution, diagnostics, and governance rather than claiming cloud-grid scale or broad application coverage. See enterprise adaptation for how these patterns carry over to a real, larger application under test.
| Evidence | Link |
|---|---|
| Live report | Interactive Allure report |
| Release | v1.0.0 |
| CI | UI Tests workflow |
| Review guide | Portfolio review path |
| Best screenshot | Failed test details |
| Engineering question | Implemented answer |
|---|---|
| How does Java browser execution stay thread-safe? | Thread-local drivers and waits, bounded TestNG workers, and Grid capacity guidance. |
| How is synchronization controlled? | Implicit waits are disabled; page objects use explicit waits only. |
| How are expensive UI flows reduced? | Cookie/API setup shortcuts support non-login scenarios while dedicated tests retain UI login coverage. |
| How are remote failures diagnosed? | Redacted screenshots, page source, capabilities, console logs, network logs, and bounded framework logs attach to Allure. |
| How is governance enforced? | Maven quality gates, focused unit tests, ADRs, retry/quarantine rules, dependency controls, and seeded-defect examples. |
Prerequisites: JDK 21, Maven wrapper, Docker and Docker Compose for Grid runs.
Run no-secret smoke coverage:
./mvnw clean test -Dgroups=inventory,cart -Dheadless=trueRun Chrome regression with secret-backed login coverage:
export APP_PASSWORD="<set-outside-repository>"
./mvnw clean verify -Dheadless=true -Dbrowser=CHROMERun through Docker Grid:
export APP_PASSWORD="<set-outside-repository>"
docker compose up --build --exit-code-from test-runnerGenerate or serve Allure locally:
./mvnw allure:report
./mvnw allure:servePowerShell example:
$env:APP_PASSWORD = "<set-outside-repository>"
.\mvnw.cmd clean verify -Dheadless=true -Dbrowser=CHROME- The main workflow compiles and verifies framework quality gates before browser jobs.
- Chrome, Firefox, and Edge run as separate Selenium Grid matrix entries.
- Forked pull requests run no-secret smoke groups; full login coverage requires repository secrets.
- Allure results are merged and published to GitHub Pages from
main. - Runtime metrics are written to
target/portfolio-metrics-v1.jsonand uploaded per browser. - Scheduled dependency/SBOM governance and quarantine checks keep evidence current.
graph TD;
CI[GitHub Actions] --> Maven;
Maven --> TestNG;
TestNG --> Config[Typed Config];
TestNG --> Pages[Page Objects];
Pages --> WebDriver[ThreadLocal WebDriver];
WebDriver --> Grid[Docker Selenium Grid];
TestNG --> Allure[Redacted Allure diagnostics];
- The bundled Grid is a lightweight reference Grid, not a high-availability browser farm.
- Accessibility coverage is an opt-in axe-core structural smoke suite over the selected pages; it is not WCAG conformance evidence or a full product audit.
- Visual checks use a baseline scaffold and whole-image hash comparisons; they are not pixel-diff tooling.
- Safari remains local headed macOS-only and requires Safari remote automation.
- The product catalog assertions intentionally use static Sauce Demo data.
