Skip to content
← All CTFL glossary terms

Equivalence partitioning

A black-box technique that divides data into partitions expected to be processed the same way, testing one value per partition.

Syllabus chapters: 4

Sources: ISTQB® Certified Tester Foundation Level syllabus 4.0.1 and the official ISTQB® Glossary. Glossary content © International Software Testing Qualifications Board; source: glossary.istqb.org.

Related terms

Equivalence partitioning in a practice question

Question 1

An input field accepts integer order quantities: Quantities from 1 to 100 are processed at the standard rate. Quantities from 101 to 500 are processed with a bulk surcharge. Any other quantity is rejected. Using equivalence partitioning, and including the invalid partitions, how many partitions must the test cases cover?

  1. 3
  2. 4
  3. 5
  4. 6
Show answer
  • 3Three would treat the two valid ranges as a single partition.
  • Correct answer: 4Two valid partitions and two invalid partitions.
  • 5Five would split one of the four partitions without a rule requiring it.
  • 6Six would add partitions the specification does not distinguish.

In equivalence partitioning the coverage items are the equivalence partitions, and 100% coverage requires test cases to exercise all identified partitions, including the invalid ones, at least once. The field has two valid partitions, 1 to 100 and 101 to 500, and two invalid partitions, quantities below 1 and quantities above 500 — four in total.

Syllabus section 4.2.1

Question 2

An online shop validates the order quantity for one article: Quantity 1 to 9: processed at the single-item price Quantity 10 to 99: processed at the bulk price Quantity 100 or more: rejected with “too many” Quantity 0 or less: rejected with “invalid quantity” Which quantities exercise every equivalence partition exactly once?

  1. Quantities 1, 9, 10 and 99
  2. Quantities 5, 50 and 150
  3. Quantities 0, 5, 50 and 150
  4. Quantities 5, 20, 50 and 150
Show answer
  • Quantities 1, 9, 10 and 99These are the boundary values of the two valid partitions; both invalid partitions stay uncovered.
  • Quantities 5, 50 and 150This covers 1–9, 10–99 and 100 and above, but leaves the invalid partition 0 and below uncovered.
  • Correct answer: Quantities 0, 5, 50 and 150One value from each of the four partitions, including both invalid ones.
  • Quantities 5, 20, 50 and 15020 and 50 both lie in 10–99, so that partition is exercised twice while 0 and below stays uncovered.

The requirement defines four non-overlapping partitions: the valid partitions 1–9 and 10–99, and the invalid partitions 100 and above and 0 and below. In equivalence partitioning the coverage items are the partitions, and to achieve 100% coverage the test cases must exercise all identified partitions, including the invalid ones, at least once. Since all elements of a partition are expected to be processed in the same way, one value per partition is sufficient: 0, 5, 50 and 150.

Syllabus section 4.2.1

Original PrepBench practice material, not official exam questions or exam dumps. PrepBench is independent and is not affiliated with or endorsed by ISTQB®.