
Example of Decision Coverage
1 2 3 4 5 6 7 8 |
(int x) { if (x < 8) print("x < 8") else print("x >= 8") } |
Test Case | Value of X | Expected Output | Observed Output | Decision Coverage | Result |
1 | 4 | “x < 8” | “x < 8” | 50% | Pass |
2 | 15 |
Decision of (x < 8) | Decision Coverage |
T | 50% |
F | 50% |
Total | 100% |