You run regression when someone remembers to ask you.
CI runs it on every single code push, automatically, and emails the red. Nobody has to remember. This is automation's endgame.
Continuous Integration means a server runs your suite on every push to the repo. GitHub ships this built-in as GitHub Actions, free for public repos. The setup is one YAML file — and you already know the command it will run: mvn test.
name: automated-tests on: push: # every push to any branch workflow_dispatch: # plus a manual Run button jobs: test: runs-on: ubuntu-latest # a fresh Linux VM, Chrome preinstalled steps: - uses: actions/checkout@v4 # get your code - uses: actions/setup-java@v4 # install JDK 21 with: distribution: temurin java-version: 21 - name: Run tests run: mvn -B test -Dheadless=true # -B = no color codes in logs - uses: actions/upload-artifact@v4 # keep failure evidence if: failure() with: name: failure-evidence path: | screenshots/ target/surefire-reports/
(This exact file is downloadable: tests.yml — including the nightly cron discussed below.) Commit it, push, and open the repo's Actions tab:
✓ automated-tests #12 (push, main) 2m 41s
✓ Set up job
✓ actions/checkout@v4
✓ actions/setup-java@v4
✓ Run tests
[INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 1
[INFO] BUILD SUCCESS
images/actions-green-run.pngThat green check now appears on every commit — and any teammate's push that breaks a test goes visibly red, with your screenshots and reports downloadable from the run page. You've built the thing teams actually pay automation engineers for.
The CI machine has no screen, so Chrome must run headless (windowless). Notice the workflow passes -Dheadless=true — the next lesson wires that flag into your DriverFactory. Sequence the two lessons' exercises accordingly: wire headless first, then push.
schedule: - cron: "0 2 * * *" under on: and your full suite also runs at 2:00 every night, exactly like a real team's nightly regression. Combine with tags: smoke on push, full suite on schedule.Fix: The path must be exactly .github/workflows/tests.yml — dot, plural workflows, committed and pushed. YAML is also indentation-sensitive: two spaces, never tabs.
Fix: That's just Maven's generic failure signal. Expand the Run tests step and scroll to the first red block — same skill as the terminal lesson, same first-red-block rule.