Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M12393

Boundary Case / Boundary Value Analysis

Boundary Case / Boundary Value Analysis
StructureHigh supportLogic
Included
account_tree

Updated 2026-08-17

Loading revision record…

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.

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/1

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

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.

  • link
    zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E9%82%8A%E7%95%8C%E6%A1%88%E4%BE%8BZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS