End-to-End QA Scenario
CI/CD with Automation + Performance Gates
Build → unit tests → deploy ephemeral env → parallel Playwright e2e → k6 perf gate → canary with auto-rollback.
Architecture
CodeCommit ─► CodePipeline ─► CodeBuild (unit + lint) ─► ECR
│
├─► CodeBuild (deploy QA stack via CFN) ─► ECS (Fargate QA)
│ │
│ ▼
│ CodeBuild fan-out: Playwright shards 1..N
│ │
│ ▼
│ S3 (HTML report + screenshots)
│
├─► CodeBuild (k6 perf gate: p95<800ms, error<1%)
│
└─► CodeDeploy (canary 10%) ─► CloudWatch alarms ─► auto-rollbackWorkflow steps
- 1
Source + unit
CodeBuild runs `npm ci && npm test`; JUnit reports surface as CodeBuild Test Reports.
- 2
Containerize
Docker build + ECR scan-on-push. Pipeline fails on HIGH/CRITICAL CVEs.
- 3
Ephemeral env
CloudFormation deploys ECS Fargate service in the QA VPC behind an internal ALB.
- 4
Parallel e2e
CodeBuild matrix runs Playwright shards 1..N in parallel; merged JUnit + HTML go to S3.
- 5
Performance gate
k6 runs a smoke perf script against the QA ALB; fails build if p95 > 800ms or error rate > 1%.
- 6
Canary to prod
CodeDeploy shifts 10% traffic for 5 minutes, watches CloudWatch alarms (5xx, p95). Auto-rollback on breach.
Key takeaways
- Every commit passes the same automation and perf gates — no manual variance.
- Sharded Playwright keeps wall-clock under 10 minutes even for large suites.
- Rollback is a CloudWatch alarm away, not a human decision.
