CS FundamentalsHardAccenture · Capgemini · ISTQB-style

An integer quantity field accepts 1 to 100. The discount is 0% for 1-10, 10% for 11-50 and 20% for 51-100. Using two-value boundary value analysis (each boundary and its nearest neighbour across it), how many distinct test values are needed?

  1. A. 6
  2. B. 8
  3. C. 12
  4. D. 4

Correct answer: B. 8

The partition edges give 0 | 1, 10 | 11, 50 | 51 and 100 | 101: eight distinct values, including the invalid 0 and 101. Taking only the six valid edges misses the invalid neighbours; 12 is the three-value count without merging.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic