According to Decision Coverage criteria(DC) criteria, every decision must be covered.
Decision Coverage ensures that all of the possible branches from each and every decision point is executed at least once and it ensures that all reachable code is executed at least one time
Example of Decision Coverage
(int x) { if (x < 8) print("x < 8") else print("x >= 8") }
Output
Test Case |
Value of X | Expected Output | Observed Output | Decision Coverage | Result |
1 | 4 | “x < 8” | “x < 8” | 50% | Pass |
2 | 15 |
Test Requirements
Decision of (x < 8) | Decision Coverage |
T | 50% |
F | 50% |
Total | 100% |