Protocol
Shrink the example until the same failure is hard to hide
A thousand-line attachment is evidence. A six-line reproducer is an invitation to solve the problem.
Before you use it
- Use when
- A large file, message or sequence fails, but nobody knows which part matters.
Keep this limit in mind
- Do this in an isolated test environment. Intermittent failures need repeatability work first; smallest-looking is not the same as globally minimal.
An idea to explore.
Try this idea.
Inspect the example, try the idea in your situation, then check your next move.
Why it matters
Reduce the input without changing the failure you are investigating. Remove a chunk, rerun the same check and keep the smaller input only when the original failure remains. When large cuts stop working, try smaller ones.
Steps
- Freeze a safe copy, the environment and an exact failure signature.
- Remove one chunk; distinguish the original failure from an unrelated validation error.
- Save the reduced failing case and a nearby passing case.
An example
A text import fails with hundreds of lines. Reduction leaves two lines and a separator; deleting that separator makes the same test pass.
Check your result
Another person can reproduce the specified failure with the reduced input.
Save and practise this idea
My learning
Read. Recall. Repeat.
Save this idea and return to it on any device.
Keep exploring
Connected ideas
You are readingShrink the example until the same failure is hard to hide
Ideas that link here
These ideas link to this one. Check their conditions and limits before use.
Useful with this ideaFind the first boundary where the record becomes wrongUse before this idea
Keep every rerun result when the failure is intermittent
Evidence and sources
Delta debugging removes parts of an input while preserving a specified failure; a 1-minimal result need not be globally smallest.
The practical reduction loop assumes a meaningful, sufficiently repeatable test and preserves the original failure signature.
Reducing Failure-Inducing Inputs · Delta Debugging; 1-minimality discussion
All sources (1)
Edition and review
Version 0.1.0
No review details are supplied for this edition.