Skip to content

v0.4.0 – CI/CD & Enterprise Readiness

Choose a tag to compare

@shossain786 shossain786 released this 15 Mar 01:38
· 186 commits to master since this release

What's New in 0.4.0

Zero config changes required in most CI environments — Selenium Boot now
detects and adapts automatically.


🔍 CI Environment Auto-Detection

  • Detects GitHub Actions, Jenkins, CircleCI, GitLab CI, Travis CI, TeamCity,
    and Bitbucket Pipelines via environment variables
  • Forces browser.headless=true automatically in all CI environments
  • Auto-derives threadCount from available CPU cores when parallel mode is
    enabled and threadCount is left at default

🐳 Docker / Container Support

  • Detects Docker containers via /.dockerenv and Kubernetes via
    KUBERNETES_SERVICE_HOST
  • Auto-applies --no-sandbox, --disable-dev-shm-usage, --disable-gpu,
    --window-size=1920,1080 to Chrome in containers
  • Auto-applies --width=1920 --height=1080 to Firefox in containers

📄 JUnit XML Report

  • JUnitXmlReporter writes target/surefire-reports/TEST-SeleniumBoot.xml
    on every run
  • Parsed natively by Jenkins, GitHub Actions, GitLab CI — no plugins needed

🚦 Build Quality Gates

  • New ci: config block in selenium-boot.yml:
ci:
  failOnPassRateBelow: 80   # fail build if pass rate drops below 80%
  maxFlakyTests: 3          # fail build if more than 3 tests were retried
  • BuildThresholdEnforcer evaluates gates after suite finish and throws BuildQualityGateException to fail the Maven build
  • Both thresholds are disabled by default

📋 CI Templates

  • .github/workflows/selenium-boot.yml — GitHub Actions workflow with Chrome setup, artifact upload (HTML report, JUnit XML, metrics JSON), and test result publishing via dorny/test-reporter
  • ci/Jenkinsfile — Jenkins declarative pipeline with JUnit result parsing and artifact archiving

🧪 Unit Tests

  • CiEnvironmentDetectorTest — thread count capping, CPU core derivation, null safety
  • BuildThresholdEnforcerTest — 13 cases covering pass rate gate, flaky test gate, disabled thresholds, exception message quality
  • JUnitXmlReporterTest — file creation, XML structure, test counts, passed/failed/skipped elements, XML escaping, overwrite on second call

Dependency

<dependency>
    <groupId>io.github.seleniumboot</groupId>
    <artifactId>selenium-boot</artifactId>
    <version>0.4.0</version>
</dependency>