Skip to content
← All CTFL learning objectives

CTFL 4.2.1: Use equivalence partitioning to derive test cases

K3

Syllabus section 4.2.1

5 original PrepBench practice questions for learning objective 4.2.1 of the CTFL 4.0 syllabus. Try the examples below and check each answer against its syllabus reference.

Practice questions

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 gives no discount for purchases below 50, a 5% discount from 50 up to and including 99.99, and 10% from 100 upwards. Which test set covers each of these three valid partitions exactly once?

  1. 25, 75, 150
  2. 50, 99.99, 100
  3. 0, 49.99, 50
  4. 75, 80, 95
Show answer
  • Correct answer: 25, 75, 15025, 75, and 150 each land in a different partition, covering all three exactly once.
  • 50, 99.99, 10050 and 99.99 both represent the middle partition, while the first partition is omitted.
  • 0, 49.99, 500 and 49.99 are both in the first partition, so a partition is covered twice.
  • 75, 80, 9575, 80, and 95 all fall in the 5% partition, leaving two partitions untested.

The three partitions are [0, 50), [50, 100), and [100, ∞). The values 25, 75, and 150 each fall into a different partition, achieving 100% partition coverage with three tests. A boundary value is still a member of one partition; the other sets repeat partitions and omit others.

Syllabus section 4.2.1

Question 3

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®.

Glossary terms in this chapter