vendredi 29 mai 2015

Minimal set of test cases with modified condition/decision coverage

I have a question regarding modified condition/decision coverage that I can't figure out.

So if I have the expression ((A || B) && C) and the task is with a minimal number of test cases receive 100% MD/DC.

I break it down into two parts with the minimal number of test cases for (A || B) and (X && C).

(A || B) : {F, F} = F, {F, T} = T, {T, -} = T
(X && C) : {F, -} = F, {T, F} = F, {T, T} = T

The '-' means that it doesn't matter which value they are since they won't be evaluated by the compiler.

So when I combine these I get this as my minimal set of test cases:

((A || B) && C) : {{F, F}, -} = F, {{F, T}, F} = F, {{T, -}, T} = T

But when I google it this is also in the set: {{F, T}, T} = T Which I do not agree on because I tested the parts of this set separately in the other tests, didn't I?

So I seem to miss what the fourth test case adds to the set and it would be great if someone could explain why I must have it?

Aucun commentaire:

Enregistrer un commentaire