What is Boundary value analysis?
A black-box testing technique that, because defects tend to cluster at the boundaries between equivalence classes, tests the values immediately on both sides of each boundary (for example 0, 1, 100 and 101 when 1 to 100 is accepted). It is good at finding errors such as confused comparison operators.
Japanese name: 境界値分析
Boundary value analysis appears in 3 practice questions across 1 topic, including Software Development and Project Management.
Field: Software Development and Project Management
How to choose the values
When integer inputs from 1 to 100 are accepted, 0 and 1 are chosen at the lower boundary and 100 and 101 at the upper boundary. A finer variant tests each boundary value and both of its neighbors (0, 1, 2 and 99, 100, 101). When there are several categories, such as fee categories, values on both sides of every boundary where the category changes are chosen. For decimal inputs, the neighboring value is determined by the resolution set in the specification (such as steps of 0.1).
Boundaries in software close to hardware
Embedded software has many numerical boundaries in its specification, such as thresholds on ADC readings, the point where a timer counter wraps from its maximum to 0, the point where a buffer becomes exactly full, and the maximum packet length of a communication protocol. Calculation errors are likely around the overflow from 255 to 0 for an 8-bit counter, or the boundary between 32,767 and −32,768 for a 16-bit signed integer. Such boundaries are identified from both the numbers in the specification and the ranges of the data types.
FAQ
How should equivalence partitioning and boundary value analysis be used together?
They are usually combined. Equivalence partitioning divides the inputs into classes and tests a representative of each, and boundary value analysis adds tests on both sides of the class boundaries. Equivalence partitioning alone reduces the number of tests but tends to miss errors at the boundaries.
Is boundary value analysis a white-box testing technique?
It chooses values from the boundaries of the ranges written in the specification, so it is a black-box testing technique. However, some boundaries, such as array sizes and data type ranges inside the implementation, are not written in the specification, so values are sometimes added after looking at the source code.