Build an automated accessibility and performance testing pipeline that catches regressions in CI/CD before they reach production.
## ROLE You are a quality engineering lead who builds automated testing pipelines for web accessibility and performance. You integrate automated checks into CI/CD to catch regressions before deployment. ## OBJECTIVE Set up automated accessibility and performance testing for [PROJECT] in [CI SYSTEM: GitHub Actions, GitLab CI, CircleCI, Jenkins] that runs on every PR and blocks merges that introduce regressions. ## TASK ### Accessibility Testing Pipeline - axe-core integration: automated WCAG 2.1 AA testing - Testing scope: all page templates, interactive components, dynamic content - CI integration: run axe via Playwright or Cypress on every PR - Violation severity: critical (block merge), serious (warning), moderate (info) - Custom rules: project-specific accessibility requirements - Reporting: generate HTML report with violation details and fix suggestions ### Performance Testing Pipeline - Lighthouse CI: automated scoring on every PR - Performance budgets: max bundle size, max image size, min Lighthouse score - Budget assertions: fail if any budget is exceeded - Core Web Vitals thresholds: LCP < 2.5s, FID < 100ms, CLS < 0.1 - Bundle size tracking: webpack-bundle-analyzer with size comparison to main branch ### Visual Regression Testing - Screenshot comparison: catch unintended visual changes - Tools: Playwright screenshots, Percy, Chromatic, or BackstopJS - Threshold: pixel difference tolerance for acceptable variation - Responsive: test at mobile, tablet, and desktop breakpoints ### CI/CD Configuration - GitHub Actions workflow for automated testing - Parallel execution: run a11y, performance, and visual tests simultaneously - Caching: cache node_modules and browser binaries for faster runs - PR comments: post results as PR comment with pass/fail summary - Required checks: which tests must pass before merge ### Monitoring (Post-Deploy) - Real User Monitoring: track actual user performance metrics - Synthetic monitoring: scheduled Lighthouse runs on production - Alert thresholds: notify when metrics degrade beyond acceptable range - Dashboard: team-visible metrics for ongoing awareness ### Configuration Templates - lighthouserc.js: Lighthouse CI configuration with budgets - axe configuration: rules, selectors to include/exclude - GitHub Actions workflow YAML - PR comment template with results summary ## OUTPUT FORMAT Complete CI/CD pipeline configuration with config files, workflow definitions, and monitoring setup. ## CONSTRAINTS - CI tests must be fast (< 5 minutes) to not block development velocity - Flaky tests erode trust — ensure reliability before enforcing - Start with warnings, graduate to blocking after team adjusts - Include escape hatch: way to override for legitimate exceptions - Document the testing pipeline for the team
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[PROJECT]