I have a question about EclEmma coverage tool,
Does the EclEmma coverage tool perform node or edge or condition or path coverage? Explain
Thank you
I have a question about EclEmma coverage tool,
Does the EclEmma coverage tool perform node or edge or condition or path coverage? Explain
Thank you
EclEmma - is Eclipse plugin based on Java Code Coverage Library called JaCoCo that performs analysis of Java bytecode. Description of coverage counters provided by JaCoCo can be found in its documentation. As you can see in it - JaCoCo and hence EclEmma provide
Don't know what you call node coverage, and I'm guessing that what you call edge coverage - is branch coverage.
Regarding condition coverage - Wikipedia says
if (a && b) { /* ... */ }
condition coverage can be satisfied by two tests
a=true, b=false
,a=false, b=true
what seems a bit weird in case of Java where &&
is a short-circuit operator - second test can't trigger retrieval of value of "b".
Regarding path coverage - JaCoCo does not provide it, what can be demonstrated using following example:
void fun(boolean a, boolean b) {
if (a) { /* ... */ }
if (b) { /* ... */ }
}
Not counting exception there are 4 paths thru this method. And so for full path coverage 4 tests will be required - a = true, b = true
, a = true, b = false
, a = false, b = true
and a = false, b = false
. However JaCoCo and EclEmma would report 100% coverage after just 2 tests - a = true, b = true
and a = false, b = false
.