際際滷

際際滷Share a Scribd company logo
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

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