1.

Explain equivalence partitioning.

Answer»

Equivalence Partitioning is also CALLED Equivalence Class Partitioning (ECP) and is a form of black-box testing. In this method, input domain data is divided into equivalence classes (partitions) and test cases are derived using these classes of data. Then, while testing, one sample value is picked from each class. By using this method, test cases are generally reduced to a finite set of testable cases that still cover the maximum requirements. 

A technique of equivalence partitioning is APPLIED only when input data values can be divided into ranges. For each range PARTITION, only one condition will be tested, assuming that all other conditions within the same partition will behave similarly. 

Example: Let's say you have an input field that can accept only percentage values between 50 and 90%. In that case, it would be pointless to write THOUSANDS of test cases for 50-90 valid input numbers, plus others for INVALID data.  

The Equivalence Partitioning method outlined above can be used to divide test cases into three classes of input data. Each test case represents a class. As you can see, in the example provided above, we were able to split our test cases into three equivalence classes (can be more) composed of invalid and valid inputs. 

Test cases for input box accepting percentages between 50 and 90 using equivalence partitioning: 

  • The valid partition: Between 50%-90% (The expectation is that the text field would handle all input percentages between 50%-90%, the same way).
  • The first invalid partition: <=50% (We’d expect the text field to reject all values greater than or equal to 50%).
  • The second invalid partition: >= 90% (We’d expect the text field to reject all values greater than or equal to 90%).


Discussion

No Comment Found