Skip to content

CI & Synthetic Monitoring

CI (continuous integration) runs your test suite automatically on every change and gates the merge on the result. Synthetic monitoring runs the same kinds of checks against production on a schedule, from outside the system, so you learn about a broken login flow before your users do.

Push / PR
│
▼
[ CI pipeline ] ← unit → integration → E2E on every change
│ green
▼
[ Deploy ]
│
▼
[ Synthetic monitor ] ← scheduled E2E + API checks in production
│ failure
▼
Alert (pager / Slack)

CI and synthetic monitoring share tests, assertions and reporting; they differ in where and when they run. Keep them consistent so a test you trust on PRs means the same thing in production.

Use it for

  • Gating merges on automated tests (CI)
  • Catching production-only failures: DNS, TLS, third-party outages, region issues
  • Watching critical user journeys (login, checkout) around the clock
  • Trending performance budgets and availability over time

Avoid or reduce it when

  • Synthetic checks duplicate every unit test — monitor the critical paths, not all code
  • Flaky tests gate the pipeline; quarantine and fix them instead of rerunning blindly
  • Monitoring runs from a single region only, giving a false picture of global health
Tool Ecosystem Notes
GitHub Actions CI YAML workflows; huge marketplace of actions
GitLab CI CI .gitlab-ci.yml; stages, artifacts, environments
Jenkins CI Self-hosted, plugin-driven, very flexible
Playwright CI/E2E Runs in CI; trace viewer and reporters
Checkly Synthetic Playwright-based checks + API monitors, alerting
Grafana Synthetic Monitoring Synthetic Probe-based checks, dashboards and alerts in Grafana
.github/workflows/test.yml
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npm ci
- run: npm test
name: ci
on:
push: { branches: [main] }
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20, cache: npm }
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npm run test:unit
- run: npm run test:e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
  • Fail the build on red. A pipeline people ignore is worse than no pipeline.
  • Cache dependencies and split slow suites into parallel jobs to keep CI fast.
  • Quarantine flaky tests with an owner and a deadline; never auto-rerun forever.
  • Upload reports and traces as artefacts so a failure is reproducible after the run.
  • Monitor critical journeys, not everything. Synthetic checks are a smoke alarm, not a substitute for a full test suite.
  • Alert on symptoms (checkout failing) rather than raw internals, and set thresholds to avoid alert fatigue.

Self-assessment quiz

Pick one answer per question, then press Check answers.

  1. What is the main difference between CI tests and synthetic monitoring?
  2. In GitHub Actions, what typically gates a pull request?
  3. Why quarantine flaky tests instead of auto-rerunning them endlessly?
  4. Which pairing is a Playwright-based synthetic monitoring service?
  5. What should a synthetic monitor watch?