CS FundamentalsVery hardGATE CS · Software Engineering · Advanced

A routine takes three integer inputs a, b, c, each with a valid range [min, max] with min < max - 1, and one boolean flag f. Under worst-case boundary value testing the ranged inputs take every combination of {min, min+1, nominal, max-1, max} and the flag takes both values. How many test cases are needed?

  1. A. 250
  2. B. 15
  3. C. 625
  4. D. 125

Correct answer: A. 250

Worst-case testing takes the Cartesian product of the 5 values of each of the 3 ranged inputs (125 combinations) and multiplies by the 2 flag values: 250. The one-at-a-time (normal) boundary method would need far fewer; 5^4 wrongly gives the flag five values.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic