Equivalence partitioning in software testing

  • Equivalence partitioning (EP) is a specification-based or black-box technique. It can be applied at any level of testing and is often a good technique to use first.
  • The idea behind this technique is to divide (i.e. to partition) a set of test conditions into groups or sets that can be considered the same (i.e. the system should handle them equivalently), hence ‘equivalence partitioning’. Equivalence partitions are also known as equivalence classes – the two terms mean exactly the same thing.
  • Valid values are values that should be accepted by the component or system
  • Invalid values are values that should be rejected by the component or system
  • Each value must belong to one and only one equivalence partition.
  • One value from each partition should be selected.
  • When invalid equivalence partitions are used in the test cases they should be tested individually, ie, not combined with other invalid equivalence partitions, to ensure that failures are not masked. Failures can be masked when several failures occur at the same time but only one is visible, causing the other failers to be undetected.
  • Partitions can be identified for any data element related to the test object, including inputs, outputs, internal values, time-related values (eg., before or after an event) and for interface parameters (eg., integrated components being tested during integration testing).
  • Any partition may be divided into sub-partitions if required.
  • Equivalent portioning is applicable at all test levels of testing.

Equivalence partitioning coverage
To achieve 100% coverage with this technique, test cases must cover all identified partitions (including invalid partitions) by using a minimum of one value from each partition.

Coverage is measured as the number of equivalence partitions tested by at least one value, divided by the total number of identified equivalence partitions, normally expressed as a percentage.

Leave a comment

Your email address will not be published. Required fields are marked *