Topics / Engineering practice
Select affected tests without pretending the graph is complete.
Test impact analysis uses known relationships to choose relevant checks. When those relationships are missing, the safe outcome is a broader run or an explicit gap.
A changed file is a starting point.
Trace from changed implementation to requirements, dependent requirements and linked tests. Review configuration, schemas and external contracts that may not be represented by a call graph. The result is a test plan under stated mapping assumptions, not a prediction of every runtime effect.
Illustrative example
The shared parser changed.
A parser serves both import and configuration loading. Only import tests are linked. A focused import run may pass while configuration behavior remains unexamined. Add the missing relationship or run the wider suite; do not interpret the missing link as an unaffected consumer.
Inspect the plan before running it.
Proof’s affected-test planner uses requirement-linked files, hierarchy and recorded test evidence. Focused commands require supported evidence for every affected requirement; incomplete traceability falls back to the configured full test command. With no explicit selection, Proof starts from authored deltas and also inspects changed files. Use --base with the PR base to include committed branch changes; the default base is HEAD. An empty relevant scope produces no commands.
proof test affected --changed-file src/parser.go
proof test affected --changed-file src/parser.go --run
proof test affected --full --runThe path is illustrative. Configure the project’s actual test commands and inspect the plan for your repository. Planning and execution are separate actions unless you request a run.
Evaluate selection against escaped failures.
Keep occasional broader runs and compare their failures with focused results. If a missed dependency causes a regression, repair the mapping and retain the lesson. Measure time saved alongside escape rate and maintenance effort.
A smaller suite is valuable only when its scope remains defensible. For consequential changes, policy may require checks regardless of the affected-test selection.
Keep the selected plan separate from the result
Illustrative review: the parser change reaches both import and configuration loading. Record the missing configuration-test link before deciding whether a focused run is sufficient.
| Recorded state | Next action | What it establishes |
|---|---|---|
| Import tests selected; configuration evidence missing | Repair the mapping or use the configured full suite | A focused import plan alone cannot cover both consumers |
| Complete eligible mapping; commands selected | Execute the plan on the candidate revision | Selection establishes which commands to run, not that they passed |
| Run completed with failures or skipped cases | Inspect each result and the remaining gaps | A command finishing is not a successful verification result |
A configuration file can change the test you need
The retained-obligation fixture changes retention from 24 hours to 12 without changing the implementation. Its declared configuration dependency and full test command are supplied explicitly; this is not a claim that automatic selection discovered the relationship. Inspect the failed retry cases and the remaining mapping gaps.
Try it on your software
Try selection on a slow, well-understood component.
Bring its test command and a recent change. We can inspect which relationships support a focused run.