Welcome to graduate2professional.blogspot.com

Thursday, December 24, 2009

What is Condition,Decision and How they influence the Coverage?

Condition - A Boolean expression containing no Boolean operators.

Decision - A Boolean expression composed of conditions and zero or more Boolean operators. A decision without a Boolean operator is a condition. If a condition appears more than once in a decision, each occurrence is a distinct condition.

Decision Coverage - Every point of entry and exit in the program has been invoked at least once and every decision in the program has taken on all possible outcomes at least once.

Modified Condition/Decision Coverage - Every point of entry and exit in the program has been invoked at least once, every condition in a decision in the program has taken all possible outcomes at least once, every decision in the program has taken all possible outcomes at least once, and each condition in a decision has been shown to independently affect.


1. Structural coverage guidelines are:
a) Every statement in the program has been invoked at least once;
b) Every point of entry and exit in the program has been invoked at least once;
c) Every control statement (i.e., branchpoint) in the program has taken all possible outcomes (i.e., branches) at least once;
d) Every non-constant Boolean expression in the program has evaluated to both a True and a False result;
e) Every non-constant condition in a Boolean expression in the program has evaluated to both a True and a False result;
f) Every non-constant condition in a Boolean expression in the program has been shown to independently affect that expression's outcome.

2. Based upon these definitions:
• Statement Coverage requires (a) only
• DC requires (b, c, d)
• MC/DC requires (b, c, d, e, f)

No comments:

Post a Comment