Equivalence Partitioning is a black-box testing technique where you divide the input domain of a function into partitions (or groups) such that all values in a group are expected to behave the same way. The key idea is to reduce the number of test cases. Instead of testing every possible input, you test one value from each partition. Intuition: If the software behaves correctly for one value in a partition, it will behave correctly for all other values in the same partition. Knowledge in Assumptions of Blackbox Testing is required.

Basic types of equivalence partitioning

Equivalence partitioning can be applied with different assumptions based on whether fault interaction is expected and whether invalid inputs are possible.

NormalRobust
Weak(best case)
Strong(worst case)
  • Weak Normal: Best case
    • Weak: No interactions between parameters
    • Normal: Only valid input values are considered, you are not dealing with complex invalid input
  • Strong Robust: Worst case
    • Strong: Interactions between parameters
    • Robust: You have to consider invalid inputs

Single parameter weak normal equivalence partitioning

In this test case design, we assume:

  • Weak: Each parameter is independent, only one input value causes bug at a time
  • Normal: The input is valid (no invalid values)

For example, if the parameter x1 is valid in the range [a, b], then the valid value to test would be any value within that range (say x1 = (a+b)/2).

Why it works: If the software works for one value in that range, it will likely work for others in the same range because there’s complex interactions.

Single parameter weak robust equivalence partitioning

In this test case design, we assume:

  • Weak: Each parameter is independent, only one input value causes bug at a time
  • Robust: Invalid values may exist

For example, if x1 is valid between [a, b], we need to test:

  1. An invalid value less than a, e.g., x1 = a-1
  2. A valid value within [a, b], e.g., x1 = (a+b)/2
  3. An invalid value greater than b, e.g., x1 = b+1

Why it works: We now check the edge cases and invalid values, ensuring the program handles all potential input scenarios.

Two parameter weak normal equivalence partitioning

In this test case design, we assume:

  • Weak: Each parameter is independent, only one input value causes bug at a time
  • Normal: We don’t consider invalid values

For example:

  • Let x1 be in [a, d] (divided into [a, b), [b, c), and [c, d])
  • Let x2 be in [e, g] (divided into [e, f), [f, g])

The main thing here is that we have exactly one point to cover a nominal value for each range for each parameter. (Note, also that we do not cover invalid values because it’s not robust)

Two parameter strong normal equivalence partitioning

In this test case design, we assume:

  • Strong: There will be interactions between parameters
  • Normal: We don’t consider invalid values Since fault interaction can occur, we have to cover every possible combination of valid values.

Two parameter weak robust equivalence partitioning

In this test case design, we assume:

  • Weak: There will be no interactions between parameters
  • Robust: We consider invalid values In this test case design, the difference is that we also consider the possibility of invalid values. However, we do not consider the possibility of fault interaction.

Two parameter strong robust equivalence partitioning

In this test case design, we assume:

  • Strong: There will be interactions between parameters
  • Robust: We consider invalid values

With strong robust, test case design, we have to consider every possibility including fault interactions and invalid values.


Back to parent page: Software Testing

Web_and_App_Development Software_Testing Software_Validation SOFT3202 Blackbox_Testing Equivalence_Partitioning