The document discusses different levels of test coverage - statement coverage (C0), branch coverage (C1), and condition coverage (C2). It provides examples of how many test cases are needed to achieve each level of coverage. For condition coverage with two conditions (C2), four test cases are required to cover all possible condition combinations.
1 of 1
Downloaded 73 times
More Related Content
Test Coverage
1. C0 : statement coverage C1 : branch coverage C2 : condition coverage
All statements are tested
1 test case
All branches are tested
2 test cases
All condition combinations are tested
22 = 4 test cases
Test Coverage (C0/C1/C2)
Cond. A && Cond. B
Statement X
Cond. A && Cond. B
Statement X
Cond. A && Cond. B
Statement X
Cond. A Cond. B
TRUE TRUE
TRUE FALSE
FALSE TRUE
FALSE FALSE
Cond. A Cond. B
TRUE TRUE
TRUE FALSE
Cond. A Cond. B
TRUE TRUE
Cover area
TRUE
FALSE FALSE FALSE
TRUE TRUE
Test cases