Boundary Value Analysis uses a model of the component that partitions the input and output values of the component into a number of ordered sets with identifiable boundaries. These input and output values are derived from the specification of the component's behaviour.
The model shall comprise bounded partitions of ordered input and output values. Each partition shall contain a set or range of values, chosen such that all the values can reasonably be expected to be treated by the component in the same way (i.e. they may be considered 'equivalent'). Both valid and invalid values are partitioned in this way. A partition's boundaries are normally defined by the values of the boundaries between partitions, however where partitions are disjoint the minimum and maximum values in the range which makes up the partition are used. The boundaries of both valid and invalid partitions are considered.
Test cases shall be designed to exercise values both on and next to the boundaries of the partitions. For each identified boundary three test cases shall be produced corresponding to values on the boundary and an incremental distance either side of it. This incremental distance is defined as the smallest significant value for the data type under consideration. A test case shall comprise the following:
- the input(s) to the component:- the partition boundaries exercised
- the expected outcome of the test case.
Test cases are designed to exercise valid boundary values, and invalid input boundary values. Test cases may also be designed to test that invalid output boundary values cannot be induced.