You are on page 1of 3

Cyclomatic Complaxity comes under white box testing. It means best path searching. To measure logical Complaxity of a prog.

for ex. 1-main() 2-if(a>1) 3{ ----------} 4-else 5-{ ------------} } Now a diagram would drawn from top as it would start from 1. underneath it would be 2. and 2 would have two edges i.e. 3 and 4. they would futher combine to form 5. 2,3,4 & 5 would make close regeoin while outside would become open region.. the arrows joining would be edges 2 would become predicate node. while others are simple nodes. it has got a formula: v(g)=Node-edges+2 v(g)= 5-5+2 v(g)=2 v(g)= predicate node+1 v(g)=1+1 v(g)=2 So its logical correct.

Cyclomatic Complaxity comes under white box testing. It means best path searching. To measure logical Complaxity of a prog. for ex. 1-main() 2-if(a>1) 3{ ----------} 4-else 5-{ ------------} } Now a diagram would drawn from top as it would start from 1. underneath it would be 2. and 2 would have two edges i.e. 3 and 4. they would futher combine to form 5. 2,3,4 & 5 would make close regeoin while outside would become open region.. the arrows joining would be edges 2 would become predicate node. while others are simple nodes. it has got a formula: v(g)=Node-edges+2 v(g)= 5-5+2 v(g)=2 v(g)= predicate node+1 v(g)=1+1 v(g)=2 So its logical correct.

You might also like