Loading...
Loading...
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.
npx skill4agent add proffesor-for-testing/agentic-qe regression-testing| Type | When | Scope |
|---|---|---|
| Corrective | No code change | Full suite |
| Progressive | New features | Existing + new |
| Selective | Specific changes | Changed + dependent |
| Complete | Major refactor | Everything |
| 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 |
// Analyze changed files and select impacted tests
function selectTests(changedFiles: string[]): string[] {
const testsToRun = new Set<string>();
for (const file of changedFiles) {
// Direct tests
testsToRun.add(`${file.replace('.ts', '.test.ts')}`);
// Dependent tests (via coverage mapping)
const dependentTests = testCoverage[file] || [];
dependentTests.forEach(t => testsToRun.add(t));
}
return Array.from(testsToRun);
}
// Example: payment.ts changed
// Runs: payment.test.ts, checkout.integration.test.ts, e2e/purchase.test.ts /\
/ \ 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)# .github/workflows/regression.yml
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// 1. Parallel execution
module.exports = {
maxWorkers: '50%', // Use half CPU cores
testTimeout: 30000
};
// 2. Sharding across CI workers
// npm test -- --shard=1/4
// 3. Incremental testing (only changed since last run)
// Track last run state, skip passing unchanged tests
// 4. Fast-fail on smoke
// Run critical tests first, abort if they fail// Smart test selection
await Task("Regression Analysis", {
pr: 1234,
strategy: 'change-based-with-risk',
timeBudget: '15min'
}, "qe-regression-risk-analyzer");
// Returns:
// {
// mustRun: ['payment.test.ts', 'checkout.integration.test.ts'],
// shouldRun: ['order.test.ts'],
// canSkip: ['profile.test.ts', 'search.test.ts'],
// estimatedTime: '12 min',
// riskCoverage: 0.94
// }
// Generate regression test from production bug
await Task("Bug Regression Test", {
bug: { id: 'BUG-567', description: 'Checkout fails > 100 items' },
preventRecurrence: true
}, "qe-test-generator");aqe/regression-testing/
├── test-selection/* - Impact analysis results
├── suite-health/* - Flakiness, timing trends
├── coverage-maps/* - Test-to-code mapping
└── bug-regressions/* - Tests from production bugsconst regressionFleet = await FleetManager.coordinate({
strategy: 'comprehensive-regression',
agents: [
'qe-regression-risk-analyzer', // Analyze changes, select tests
'qe-test-executor', // Execute selected tests
'qe-coverage-analyzer', // Analyze coverage gaps
'qe-quality-gate' // Go/no-go decision
],
topology: 'sequential'
});qe-regression-risk-analyzer