Reputation: 333
In the context of DO-178B, the number of conditions and inputs might differ: (A && B) or (A && C)
has three inputs but four conditions because each occurence of A
is considered a unique condition.
Multiple condition coverage requires 2^n test cases, where n is the number of inputs.
But what about this:
if(X>100 && X<200 && X!=50)
There are three conditions using the same input but I am sure that is not what the authors mean, otherwise I would need just two test cases to cover all combinations among those conditions.
Then I wonder, what is then meant by input - a boolean value in the decision? That would make sense in the quote I mentioned, as A will have the same value in all occurences. But I would like to understand and know if my thought is correct.
Upvotes: 0
Views: 36
Reputation: 8215
I am not familiar with DO-178B, but from the statement that they require
2^n test cases, where n is the number of inputs
I would deduce that the number of inputs in this context is the number of different (or independent) conditions.
This has nothing to do with the fact that in your example all conditions depend on only one integer variable.
However, in your example you will not be able to generate all 2^3 test cases because the 3rd condition is redundant. So in practice you would remove it and end up with two inputs.
Upvotes: 0