Statement Coverage & Decision Coverage - Example - Structure based testing techniques
Q. Read A,B
If A>=2
Print A+B
else
Print A-B
EndIf
If B<1
Print B-A
End
For the above algorithm what will be the minimum number of test cases required to achieve 100% Statement Coverage and Decision Coverage?
- Published on 14 Aug 15a. SC=2,DC=2
b. SC=1,DC=3
c. SC=2,DC=3
d. SC=3,DC=3
ANSWER: SC=2,DC=2