For a function of two variables, boundary value analysis yields,

2022

For a function of two variables, boundary value analysis yields,

  1. A.

    4n+3 test cases

  2. B.

    4n+1 test cases

  3. C.

    n+4 test cases

  4. D.

    2𝑛+4 test cases

Attempted by 66 students.

Show answer & explanation

Correct answer: B

Answer: 4n+1 test cases (for two variables, 9 test cases)

Explanation: The standard boundary value analysis strategy is to test boundaries for one variable at a time while keeping all other variables at their nominal (typical) values, and to include one test where every variable is at its nominal value.

  • For each variable you create four boundary tests: minimum, just above minimum, just below maximum, and maximum.

  • All other variables are kept at their nominal values during each of those tests.

  • Additionally include one test where every variable is at its nominal value.

From this we get the formula: 4n + 1 (4 tests per variable, plus 1 nominal test).

Example for two variables:

  1. Both variables at nominal values.

  2. First variable at minimum, second at nominal.

  3. First variable just above minimum, second at nominal.

  4. First variable just below maximum, second at nominal.

  5. First variable at maximum, second at nominal.

  6. Second variable at minimum, first at nominal.

  7. Second variable just above minimum, first at nominal.

  8. Second variable just below maximum, first at nominal.

  9. Second variable at maximum, first at nominal.

Counting these gives 1 (all nominal) + 4 tests for the first variable + 4 tests for the second variable = 9 = 4*2+1.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor