Lets, consider we have the following method:
public void testIt(boolean a, boolean b){
if (a && b){
...
}
if (a){
....
}
}
Cyclomatic complexity of this method =3. So, according to basis path testing we should have 3 tests in order to achieve statement and decision coverage. However, I see that I can use only two tests (true, true) and (false,false) to achieve statement and decision coverage. Where is my mistake?
Aucun commentaire:
Enregistrer un commentaire