You are here

Boundary Value Analysis (BVA)

A boundary value is any input or output value on the edge of an equivalence partition.
Boundary value analysis (BVA) is based on testing at the boundaries between partitions.
Here we have both valid boundaries (in the valid partitions) and invalid boundaries (in the invalid partitions).
As an example, consider a printer that has an input option of the number of copies to be made, from 1 to 1000. To apply boundary value analysis, we will take the minimum and maximum (boundary) values from the valid partition (1 and 1000 in this case) together with the first or last value respectively in each of the invalid partitions adjacent to the valid partition (0 and 1001 in this case). In this example we would have three equivalence partitioning tests (one from each of the three partitions) and four boundary value tests. Consider the bank system described in the previous section in equivalence partitioning.

Invalid Partition Valid Partition Invalid Partition
0 1-1000 1001 and above
And the boundary values will be 1, 1000 from valid partition and 0,1001 from invalid partitions.

Boundary Value Analysis is a black box test design technique where test case are designed by using boundary values, BVA is used in range checking.

Another Example

A store in city offers different discounts depending on the purchases made by the individual. In order to test the software that calculates the discounts, we can identify the ranges of purchase values that earn the different discounts. For example, if a purchase is in the range of €1 up to €50 has no discounts, a purchase over €50 and up to €200 has a 5% discount, and purchases of €201 and up to €500 have a 10% discounts, and purchases of €501 and above have a 15% discounts.

We can identify 4 valid equivalence partitions and 1 invalid partition as shown below.

Invalid Partition Valid Partition(No Discounts) Valid Partition(5%) Valid Partition(10%) Valid Partition(15%)
€0.01 €1-€50 €51-€200 €201-€500 €501-Above
From this table we can identify the boundary values of each partition. We assume that two decimal digits are allowed.

Boundary values for Invalid partition: 0.00
Boundary values for valid partition(No Discounts): 1, 50
Boundary values for valid partition(5% Discount): 51, 200
Boundary values for valid partition(10% Discount): 201,500
Boundary values for valid partition(15% Discount): 501, Max allowed number in the software application