Boundary Case / Boundary Value Analysis
Updated 2026-08-17
Summary
A testing strategy that targets the edge values of an input range, because that is where defects gather.
Definition
Boundary value analysis concentrates testing on boundary conditions, such as the maximum, the minimum, exactly passing, and exactly failing values. Its core proposition is that errors cluster at the edges of an input domain rather than in its middle, so a small set of boundary cases covers the highest risk. The key condition is that the boundary itself must be precisely defined before anyone can test against it.
Introduction
How to use
- Target the edges: spend limited test budget on the extreme and just-over values. - Force the definition: testing a boundary exposes whether the requirement behind it is even clear. - Cover with less: a handful of boundary cases can replace many typical-value ones.
Mechanism
Software defects gather where a value exactly equals, slightly exceeds, or falls just short of a threshold, because the comparison logic lives there and is easiest to get wrong by one. The middle of a range, by contrast, is already exercised by every other case.
Practice
In progress 0/1Practice this model in one real situation:
Cases
- Array indices of zero and n minus one, a customer who is exactly eighteen years old, and a discount threshold met at exactly one hundred yuan.
Common pitfalls
- Testing only the typical middle input values and skipping the extremes altogether.
- Leaving the boundary undefined, so the edge cases simply never get found.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E9%82%8A%E7%95%8C%E6%A1%88%E4%BE%8Bverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS