I'm a little bit confused about code coverage criteria; especially condition and edge coverage.
As stated in this book, edge coverage does not subsume condition coverage; BUT my lecture material defines condition coverage in the following way:
Edge Coverage Criterion: Select a test set T
such that, by executing a program P
for each d
in T
, each edge of P
‘s control flow graph is traversed at least once
Condition Coverage Criterion: Select a test set T
such that, by executing P
for each element in T
, each edge of P
‘s control flow graph is traversed, and all possible values of the constituents of compound boolean conditions are exercised at least once.
So, the first part of the definition of condition coverage is obviously the same as the whole definition of edge coverage. Hence, I thought condition coverage implies edge coverage ...
Is the definition broken? What's correct?