Tuesday, March 31, 2009

Equivalence Partitioning

Equivalence partitioning is a software testing technique to minimize number of permutation and combination of input data. In equivalence partitioning, data is selected in such a way that it gives as many different out put as possible with the minimal set of data.

If software behaves in an identical way for a set of value, then the set is termed as equivalence class or a partition. It can be assumed safely that functionality of the software will be same for any data value from the equivalence class or partition. In equivalence partitioning, input data is analyzed and divided into equivalence classes which produces different output. Now, data from these classes can be representative of all the input values that your software expect.

For equivalence classes, it can be assumed that software will behave in exactly same way for any data value from the same partition.The testing theory related to equivalence partitioning says that only one test case of each partition is needed to evaluate the behaviour of the program for the related partition.

In other words it is sufficient to select one test case out of each partition to check the behaviour of the program. To use more or even all test cases of a partition will not find new faults in the program. The values within one partition are considered to be "equivalent." Thus the number of test cases can be reduced considerably.

An additional effect by applying this technique is that you also find the so called "dirty" test cases. An inexperienced tester may be tempted to use as test cases the input data 1 to 12 for the month and forget to select some out of the invalid partitions. This would lead to a huge number of unnecessary test cases on the one hand, and a lack of test cases for the dirty ranges on the other hand.

No comments:

Post a Comment