Manual testing is exhausting, right? Particularly when a large pool of combinations of inputs exists. In this case, we have to work smartly and focus on some special techniques for selecting the test cases from that large data.
We know that we can not cover the whole test cases, but we can pick some test cases with special techniques that will be sufficient to test the entire data.
So basically we use two techniques in this case Boundary Value Analysis and Equivalence Partitioning. In this blog, we will cover both these techniques.
- Equivalence partitioning :
In this technique we divide whole data into different equivalent partitions or groups, the main aim is to reduce the total number of test cases which reduces the total number of time required for testing.
Example: We have a text box in which only values 5 to 10 are considered valid, while values >=11 or values <= 4 are considered to be invalid.
Checking all the values, in this case, is very difficult since the number of test cases would be in the hundreds. Here we use the equivalence partitioning where we divide the data set into different partitions.
Here is the test condition:
- If we enter any Number greater than 10 entered in the Text field(let say 11) is considered invalid.
- If we enter any Number less than 5 that is 4 or below, then it is considered invalid.
- Numbers 5 to 10 are considered valid.
- Any Three-digit number Ex: 101 is considered invalid.
These sets are called Equivalence Partitions or Equivalence Class since we have split the sets. Now we have to pick one value from each partition for the testing.
The concept behind this technique is that if one condition/value in a partition passes all others will also pass. Likewise, if one condition in a partition fails, all other conditions in that partition will fail.
Hence we choose the values 2,7,52,102 from the partitions, we see that only value 7 will be a valid input because it is from the valid partition other values will be invalid in this situation.
- Boundary Value Analysis:
In this technique, the testing is done between the extreme ends of boundaries present in partitions of the input values. So the extreme ends like Minimum, Just above the minimum, A nominal value, Just below the maximum, Maximum. The concept of equivalence partitioning is used in this case as first we have to divide the values into valid and invalid sets, after that we apply boundary value analysis on it.
Example: Let’s take the above example used in equivalence partitioning in this case. We have a text box in which only values 5 to10 are considered valid while values >=11 or values <= 4 are considered to be invalid.
Here is the test condition:
- If we enter any Number greater than 10 entered in the Text field(let’s say 11) is considered invalid.
- If we enter any Number less than 5 that is 4 or below, then it is considered invalid.
- Numbers 5 to 10 are considered valid.
- Any Three-digit number Ex: 101 is considered invalid.
In Boundary Value Analysis, you test boundaries between equivalence partitions.
In our earlier equivalence partitioning example, instead of checking one value for each partition, you will check the values at the partitions like 4,5,10,11,99,100 and so on. As you may observe, you test values at both valid and invalid boundaries. It is also called range checking.
Both the techniques are closely related and can be used together while testing.