| name | regression-testing |
| description | Strategic regression testing with test selection, impact analysis, and continuous regression management. Use when verifying fixes don't break existing functionality, planning regression suites, or optimizing test execution for faster feedback. |
| category | specialized-testing |
| priority | high |
| tokenEstimate | 1000 |
| agents | ["qe-regression-risk-analyzer","qe-test-executor","qe-coverage-analyzer"] |
| implementation_status | optimized |
| optimization_version | 1 |
| last_optimized | "2025-12-02T00:00:00.000Z" |
| dependencies | [] |
| quick_reference_card | true |
| tags | ["regression","test-selection","impact-analysis","ci-cd","change-based","risk-based"] |
| trust_tier | 3 |
| validation | {"schema_path":"schemas/output.json","validator_path":"scripts/validate-config.json","eval_path":"evals/regression-testing.yaml"} |
Regression Testing
<default_to_action>
When verifying changes don't break existing functionality:
- ANALYZE what changed (git diff, impact analysis)
- SELECT tests based on change + risk (not everything)
- RUN in priority order (smoke → selective → full)
- OPTIMIZE execution (parallel, sharding)
- MONITOR suite health (flakiness, execution time)
Quick Regression Strategy:
- Per-commit: Smoke + changed code tests (5-10 min)
- Nightly: Extended regression (30-60 min)
- Pre-release: Full regression (2-4 hours)
Critical Success Factors:
- Smart selection catches 90% of regressions in 10% of time
- Flaky tests waste more time than they save
- Every production bug becomes a regression test
</default_to_action>
Quick Reference Card
When to Use
- After any code change
- Before release
- After dependency updates
- After environment changes
Test Selection Strategies
| Strategy | How | Reduction |
|---|
| Change-based | Git diff analysis | 70-90% |
| Risk-based | Priority by impact | 50-70% |
| Historical | Frequently failing | 40-60% |
| Time-budget | Fixed time window | Variable |
Change-Based Test Selection
function selectTests(changedFiles: string[]): string[] {
const testsToRun = new Set<string>();
for (const file of changedFiles) {
testsToRun.();
dependentTests = testCoverage[file] || [];
dependentTests.( testsToRun.(t));
}
.(testsToRun);
}