Equivalence class partitioning is a black box test design technique. In equivalence partitioning, we divide the entire possible input range into partitions. After partitioning, we may pick any value from the partition and test accordingly. The assumption is that if we pick a value from an invalid partition, the system should reject that value, and if it doesn’t do that, then our system fails the test. Likewise, if the value is from a valid partition, the system should accept the value. We pick exactly one value from each partition.
Age (21 to 70 years except for 30 to 35 years)
Invalid Partition | Valid Partition | Invalid Partition | Valid Partition | Invalid Partition |
---|---|---|---|---|
Age < 21 | ||||
(This includes negative age as well) | 21 ≤ Age ≤ 29 | 30 ≤ Age ≤ 35 | 36 ≤ Age ≤ 70 | Age > 70 |
Date (1 - 31)
Invalid Partition | Valid Partition | Invalid Partition |
---|---|---|
Date < 1 | 1 ≤ Date ≤ 31 | Date > 31 |
Here, we have created various equivalence classes based on the conditions. Then, we will perform our test by picking exactly one value from each partition and checking if the valid partition values are accepted. Any invalid partition values will be rejected by the system.
Boundary value analysis is another black box testing technique that checks the behavior of the system at input boundaries. Moreover, it checks boundary values on all partitions and also on the input test data range. It brings into consideration input domain/partition boundary values rather than the values in the center of the domain boundaries. It tests both sides of the boundary, i.e., the lower boundary as well as the upper boundary.
Lower Boundary = (min, min + 1)
Upper Boundary = (max - 1, max)
Age (21 to 70 years except for 30 to 35 years)
Invalid | Valid | Valid | Invalid | Invalid | Valid | Valid | Invalid |
---|---|---|---|---|---|---|---|
(min - 1) | (min, min + 1) | (max - 1, max) | (min, min + 1) | (max - 1, max) | (min, min + 1) | (max - 1, max) | (max + 1) |
20 | 21, 22 | 28, 29 | 30, 31 | 34, 35 | 36, 37 | 69, 70 | 71 |
Here, we have tested the upper and lower boundary for each range in order to cover and test each possible boundary scenario.