top of page

Please explain the Equivalence partitioning technique?


ISTQB definition:

Equivalence partitioning (partition testing) - is a black-box test technique in which test cases are designed to exercise equivalence partitions by using one representative member of each partition. Equivalence partition (equivalence class) - is a portion of the value domain of a data element related to the test object for which all values are expected to be treated the same based on the specification. The idea behind the technique is to divide (that is, to partition) a set of test conditions into groups or sets where all elements of the set can be considered the same, so the system should handle them equivalently, hence 'equivalence partitioning'.

Human language:

Equivalence partitioning or equivalence class partitioning Equivalence partitions are also known as equivalence classes – the two terms mean exactly the same thing. Equivalence partitioning - is a technique of software testing in which input data is divided into partitions of valid and invalid values. The testing theory related to equivalence partitioning says that only one test case of each partition is needed to evaluate the behavior.

In other words, it is sufficient to select one test case out of each partition to check the behavior of the program for the related partition. If a condition of one partition is true, then the condition of another equal partition must also be true, and if a condition of one partition is false, then the condition of another equal partition must also be false. Using 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. The equivalence partitions are derived from the requirements and specifications of the software.

Life example:

Let's take a look at a simple example of equivalence partitioning. Imagine that a QA Engineer has to test the age selection field of the registration form:

Our requirement is: Only users aged 20 to 60 can register on the site; Using equivalence partitioning, the QA Engineer divides input data into partitions of valid and invalid values. According to our requirements, there are:

  1. Equivalence class with valid values: Users in age from 20 years to 60 years.

  2. Equivalence class with invalid values: Users in age from 0 to 19 years.

  3. Equivalence class with invalid values: Users in age 61 years and more.

In order to test our condition for the age in the registration form, the QA engineer has to select one value from each equivalence class, for example:

  • For Equivalence class with valid values: Users in age from 20 years to 60 years - Input value 25 in the age field and try to register.

  • For Equivalence class with invalid values: Users in age from 0 to 19 years - Input value 5 in the age field and try to register.

  • For Equivalence class with invalid values: Users in age 61 years and more - Input value 70 in the age field and try to register.

If a condition of one partition is true, then the condition of another equal partition must also be true, and if a condition of one partition is false, then the condition of another equal partition must also be false.

Conclusion:

So, if you are asked at an interview: Please explain the Equivalence partitioning technic. The best way to answer is: Equivalence partitioning - is a technique of software testing in which input data is divided into partitions of valid and invalid values. The testing theory related to equivalence partitioning says that only one test case of each partition is needed to evaluate the behavior of the program for the related partition.

193 views

Recent Posts

See All

Comentarios


bottom of page