Design Patterns    |     Security    |     Testing    |     Distributed Computing    |     Contact
Boundary Value Analysis

Boundary value analysis is strongly related to equivalence partitioning as it is focused on testing the boundaries between partitions.

In the example below, -1, 0, 10000, 1000.01, 30000, 3000.01, 60000, 6000.01 are boundary values. They define the boundaries of each partition.

It is important to create test cases for each boundary value in order to verify that the software treats these conditions properly.

At a minimum, we need one test case for each equivalence partition and one test case for each boundary value.


Consider an application that calculates income tax based on the following rules:

Consider N the amount of income

  • If 0 <= N <=10,000 the tax is zero
  • If 10,000 < N <= 30,000 the tax is 10% of N
  • If 30,000 < N <= 60,000 the tax is 20% of N
  • If 60,000 < N the tax is 50% of N

Use equivalence partitioning and boundary value analysis in order to determine:

  1. The equivalence partitions
  2. The boundary values
  3. How many tests are necessary for a good coverage
Invalid partition 0% tax 10% tax 20% tax 50% tax Invalid Partition
                    -1 0         10000 1000.01         30000 3000.01         60000 6000.01            ? ?

Upper limit of income N is not specified. In practice we will conduct some investigation. For example the upper limit may be determined by the size of the database column where that value is stored.

Disregarding the upper limit we have five equivalence partitions and eight boundary values. A minimum of 13 tests will provide a good coverage