Boundary Value Analysis (BVA)

Boundary Value Analysis (BVA) is a technique for designing test cases. It may also be termed as a technique for choosing test data, such that data that lie along the extremes or boundaries are chosen. Such boundary data would include – the maximum, minimum, error values, just in or out of range values. In the case of Equivalence classes, we might say that boundary values are data on, above and below the edges of input and output equivalence classes. Experience shows that tests which test for boundary value conditions are able to find more defects than just selecting any element in an equivalence class as a representative for the elements of the class. BVA focuses on both input and output conditions and requires that elements be selected so that the edges of the equivalence class be tested.

Examples include -
  • If the input or output condition states that the number of values must lie within a specific range, then
    • Create two positive tests, one at either end of the range.
    • Create two negative tests, one just beyond the valid range at the lower end and one just beyond the upper end
  • Lets say an input parameter accepts a range of values such as numbers from 1 to 10, test for 0, 1, 10 and 11
  • In a similar vein, if an application outputs a set of data records, say max of 10 records for a given query, write tests that cause the application to output 0, 1, 10 records as well as a test that could cause the application to incorrectly display > 10 records. The idea is to examine the boundaries of the output conditions. However, it may not always be possible to generate an output outside the range, but it is definitely something to consider when developing tests.