Decision  Coverage Decision  Coverage  states that you must write enough test cases that each decision has a true and a false outcome at...

Decision or Branch Coverage

Decision Coverage
Decision Coverage states that you must write enough test cases that each decision has a true and a false outcome at least once. In other words, each branch direction must be traversed at least once. Examples of branch or decision statements are switch-case, do-while, and if-else statements.
Decision coverage usually can satisfy statement coverage. Since every statement is on some sub-path emanating either from a branch statement or from the entry point of the program, every statement must be executed if every branch direction is executed.






Condition-coverage
In condition coverage, you write enough test cases to ensure that each condition in a decision takes on all possible outcomes at least once, and that each statement is executed at least once. Lets take a look to this example:




Practice
Click on this link for more details: http://www.verifysoft.com/en_example_mcdc.html



0 comments :