Incremental test selection (only changed paths)
Running only the tests affected by a given code change - using dependency graph analysis - so CI feedback stays fast as the codebase grows to millions of lines.
- ·TORS (Test Oracle Reliability Score) is measured and exceeds 90%
- ·Acceptance tests are auto-generated from ticket requirements (Autonomous Requirements pipeline)
- ·Incremental test selection runs only tests affected by changed code paths
- ·TORS is tracked per service or module, not just as an aggregate
- ·Test generation from tickets includes edge cases, not just happy paths
Evidence
- ·TORS dashboard showing 90%+ score with per-service breakdown
- ·Ticket-to-test pipeline configuration with sample outputs
- ·CI configuration showing incremental test selection (e.g., Bazel test targeting, Jest --changedSince)
What It Is
Incremental test selection is the practice of running only the tests that are affected by a specific code change, rather than the full test suite. When you change a function in module A, incremental test selection identifies which tests depend on module A (directly or transitively) and runs only those. Tests for modules B, C, and D are skipped because the change can't affect them.
This sounds simple, but it requires sophisticated dependency analysis. Tools like Nx (for JavaScript monorepos), Bazel (for multi-language builds), pytest-testmon (for Python), and Gradle's incremental build feature maintain a dependency graph of the codebase - mapping which files depend on which other files, which tests cover which code paths, and which tests are safe to skip for a given change. The analysis happens automatically; developers just run tests and see only the relevant ones execute.
At Level 1-2, teams run the full test suite on every change. This works until the test suite grows past a few hundred tests or the codebase passes a certain scale. Above that threshold, full test suite runs take 15, 30, or 60 minutes - making the feedback loop too slow for effective development. At Level 3 (Systematic), incremental test selection is implemented systematically so that CI feedback time stays under 10 minutes regardless of codebase size.
The distinction at L3 is that incremental selection is configured and maintained as an organizational practice, not a tool one engineer uses on their laptop. It's applied in the CI pipeline, tested for correctness (selection errors that skip relevant tests are treated as bugs), and measured for impact on feedback loop time.
Why It Matters
Incremental test selection becomes critical as AI-assisted development accelerates code production:
- Feedback loop preservation - When AI agents produce code changes faster than humans, the feedback loop becomes the bottleneck. A 45-minute test suite run on every change means an agent can only iterate twice per hour. Incremental selection can reduce that to 5-8 minutes.
- Parallel agent enablement - Multiple agents running simultaneously each need fast CI feedback. Running full test suites for 10 parallel agents simultaneously would saturate CI infrastructure. Incremental selection reduces per-agent CI load.
- Developer experience - Long CI times are a documented cause of developer frustration and interrupted flow. Keeping local test runs under 2 minutes and CI runs under 10 minutes is a developer productivity goal in its own right.
- Cost reduction - CI infrastructure costs scale with compute time. Incremental selection can reduce CI costs by 60-80% in large monorepos.
- Scale enablement - Without incremental selection, test suite time grows linearly with codebase size. With it, time stays roughly constant. This is the difference between a CI system that degrades over time and one that scales.
Before implementing incremental test selection, measure your current test suite execution time and segment it by module or service. Often, 20% of the test suite accounts for 80% of the execution time - and those tests are rarely touched. Identifying the slow-test offenders lets you prioritize both incremental selection and test optimization.
Getting Started
6 steps to get from here to the next level
Common Pitfalls
Mistakes teams actually make at this stage - and how to avoid them
How Different Roles See It
Bob's team's CI pipeline takes 38 minutes end-to-end. Developers are waiting for CI results before responding to review comments, creating a 38-minute minimum cycle for each round of feedback. With two or three review rounds per PR, a single feature can take half a day just in CI wait time.
What Bob should do - role-specific action plan
Sarah has been trying to improve cycle time (time from PR open to merge) and has hit a wall. She's addressed review turnaround time but the CI wait component is stubbornly high. She suspects test suite time is the culprit but hasn't been able to quantify it.
What Sarah should do - role-specific action plan
Victor has already configured Nx for the JavaScript services and reduced their CI time from 25 minutes to 4 minutes. The improvement is dramatic and well-received. But the Python services and the Java monolith still run full test suites and take 40 minutes.
What Victor should do - role-specific action plan
Further Reading
6 resources worth reading - hand-picked, not scraped
From the Field
Recent releases, projects, and discussions relevant to this maturity level.