| 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"] |
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
Regression Types
| Type | When | Scope |
|---|
| Corrective | No code change | Full suite |
| Progressive | New features | Existing + new |
| Selective | Specific changes | Changed + dependent |
| Complete | Major refactor | Everything |
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.add(`${file.replace('.ts', '.test.ts')}`);
const dependentTests = testCoverage[file] || [];
dependentTests.forEach(t => testsToRun.add(t));
}
return Array.from(testsToRun);
}
Regression Suite Pyramid
/\
/ \ Full Regression (weekly)
/ \ - All tests (2-4 hours)
/------\
/ \ Extended Regression (nightly)
/ \ - Unit + integration + critical E2E (30-60 min)
/------------\
/ \ Quick Regression (per commit)
/________________\ - Changed code + smoke tests (5-10 min)
CI/CD Integration
jobs:
quick-regression:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Analyze changes
id: changes
uses: dorny/paths-filter@v2
with:
filters: |
payment:
- 'src/payment/**'
auth:
- 'src/auth/**'
- name: Run affected tests
run: npm run test:affected
- name: Smoke tests (always)
run: npm run test:smoke
nightly-regression:
if: github.event_name == 'schedule'
timeout-minutes: 120
steps:
- run: npm test -- --coverage
Optimization Techniques
module.exports = {
maxWorkers: '50%',
testTimeout: 30000
};
Agent-Driven Regression
await Task("Regression Analysis", {
pr: 1234,
strategy: 'change-based-with-risk',
timeBudget: '15min'
}, "qe-regression-risk-analyzer");
await Task("Bug Regression Test", {
bug: { id: 'BUG-567', description: 'Checkout fails > 100 items' },
preventRecurrence: true
}, "qe-test-generator");
Agent Coordination Hints
Memory Namespace
aqe/regression-testing/
├── test-selection/* - Impact analysis results
├── suite-health/* - Flakiness, timing trends
├── coverage-maps/* - Test-to-code mapping
└── bug-regressions/* - Tests from production bugs
Fleet Coordination
const regressionFleet = await FleetManager.coordinate({
strategy: 'comprehensive-regression',
agents: [
'qe-regression-risk-analyzer',
'qe-test-executor',
'qe-coverage-analyzer',
'qe-quality-gate'
],
topology: 'sequential'
});
Related Skills
Remember
Regression testing is insurance against change. Every code change is a risk. Smart regression testing mitigates that risk by testing what matters based on what changed.
Good regression testing is strategic, not exhaustive. You cannot test everything, every time. Select based on changes, risk, and time budget.
With Agents: qe-regression-risk-analyzer provides intelligent test selection achieving 90% defect detection in 10% of execution time. Agents generate regression tests from production bugs automatically.