Parallel test execution orchestration with intelligent scheduling, retry logic, and comprehensive result aggregation.
Guide the use of v3's test execution capabilities including parallel orchestration, smart test selection, flaky test handling, and distributed execution across multiple environments.
# Run all tests with parallelization
aqe test run --parallel --workers 4
# Run affected tests only
aqe test run --affected --since HEAD~1
# Run with retry for flaky tests
aqe test run --retry 3 --retry-delay 1000
# Run specific test types
aqe test run --type unit,integration --exclude e2e
// Orchestrate test execution
Task("Execute test suite", `
Run the full test suite with:
- 4 parallel workers
- Retry flaky tests up to 3 times
- Generate JUnit report
- Fail fast on critical tests
Report results and any failures.
`, "qe-test-executor")
// Smart test selection
Task("Run affected tests", `
Analyze changes in PR #123 and:
- Identify affected test files
- Run only relevant tests
- Include integration tests for changed modules
- Report coverage delta
`, "qe-test-selector")
await testExecutor.runParallel({
suites: ['unit', 'integration'],
workers: 4,
distribution: 'by-file', // or 'by-test', 'by-duration'
isolation: 'process',
sharding: {
enabled: true,
total: 4,
index: process.env.SHARD_INDEX
}
});
await testExecutor.runAffected({
changes: gitChanges,
selection: {
direct: true, // Tests for changed files
transitive: true, // Tests for dependents
integration: true // Integration tests touching changed code
},
fallback: 'full-suite' // If analysis fails
});
await testExecutor.handleFlaky({
detection: {
enabled: true,
threshold: 0.1, // 10% flake rate
window: 100 // Last 100 runs
},
strategy: {
retry: 3,
quarantine: true,
notify: ['#flaky-tests']
}
});