An exit criterion can be defined by the relationship between the number of tested values and the total number of equivalence partitions:
EP coverage = (Number of tested EPs / total number of EPs) ×100%
In our example, 18 input value equivalence partitions are derived from the specifications, of which 1510 are used to build test cases, which equates to equivalence partition coverage of 83%:
EP coverage = (15/18) ×100% = 83.33%
Case Study: Equivalence partition coverage
The 14 test cases include representatives from all 18 equivalence partitions. In other words, executing all 14 test cases results in 100% equivalence partition coverage. If the final three tests are left out due to time constraints, all three invalid equivalence partitions for the discount parameter remain untested and coverage is reduced to 15/18 = 83.33%.
The degree of coverage defines testing thoroughness
The greater the degree of coverage you aim for, the more thoroughly the test object will be tested. The coverage figure defines the desired depth of testing and is used as a reference criterion to check that the required testing objective have been achieved.
Returning to our example above, if the test plan defines equivalence partition coverage of 80%, this figure is achieved and equivalence partition testing is complete when 15 out of the 18 possible test cases has been executed.
Our example shows how important the decomposition of input data into equivalence partitions can be. If not all the possible equivalence partitions and their representatives are identified, you can achieve a high degree of coverage that is, unfortunately, based on an incorrect number of equivalence partitions. In other words, an apparently good result doesn’t accurately mirror the actual thoroughness of the test. The test cases you build using equivalence partitions are only as good as the amount of care you take identifying the appropriate equivalence partitions.
Leave a Reply