Back to the 2020 paper

Module 4: Software Testing

20207m

How are boundary conditions tested in black box testing? Explain with example.

Worked SolutionAI Assisted

Solution

Black Box Boundary Value Analysis (BVA)

Concept: Errors cluster at boundaries. Instead of random values, test at edges of equivalence partitions. For a range [min,max][min, max], test: min,min+1,max−1,max,min−1,max+1min, min+1, max-1, max, min-1, max+1 (invalid).

How boundary conditions tested:

  1. Identify input domain boundaries from SRS (e.g., age 18-60, array size 1-100)
  2. Create equivalence partitions (valid / invalid)
  3. Pick values: at boundary, just inside, just outside
  4. For nn variables, 4n+14n+1 test cases (or 6n+16n+1 with invalid). Also robust BVA includes invalid.

Example: Program accepts marks 0-100, grade calculation.

Test Case Input Expected
Below lower -1 Invalid
At lower 0 Pass (F)
Just above lower 1 Pass
Mid 50 Pass
Just below upper 99 Pass
At upper 100 Pass (A)
Above upper 101 Invalid

Boundary coverage: Detects off-by-one errors like if (marks > 0 && marks < 100) incorrectly rejecting 0/100.

Advantage: Minimum test cases, maximum fault detection at edges where developers often use < vs <= incorrectly.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.