Quality Testing

Quality is delighting customers

Could anyone please explain about Cyclomatic Complexity,& in our Manual testing where does it occurs,is it Whitebox testing concept?

Hi all,

 

Could any one please explain the cyclomatic complexity concept.

In manual testing where does it occurs, is it white box testing concept or a part of black / grey box testing.

 

thanks

shailaja

Views: 244

Reply to This

Replies to This Discussion

 

Hi Shailaja,

 

 Cyclomatic Complexity : It is a software metric which is used to measure the Complexity of the software program. Cyclomatic Complexity metric is based on the number of decision in a program. 

 

Cyclomatic Complexity :- The number of independent paths through a program. Cyclomaticcomplexity is defined as: L – N + 2P, where- L = the number of edges/links in a graph- N = the number of nodes in a graph- P = the number of disconnected parts of the graph (e.g. a called graph or subroutine)   Source : ISTQB Glossary of terms . 

 

It doesn't take place in Manual testing .  Neither it is a part of White Box...   In fact It is the Part of Verification Static testing , It is done with the help of Static Analysis tools..  

 

For example :-

 

1. void test::Test3()

2. {

3. string a,b,c,d,e,f;

4. if(((a==b)&&(e==f))||(f==a)||(a==b))

5. c=d;

6. else

7. c=f;

8. }

 

To find the cyclomatic Complexity of the above program :-   

There is no need to follow lengthy process :--- Its quite simple :--

 Cyclomatic Complexity :- Total number of Condition + 1. 

 hence in this Example:-   there is only one if condition so the Cyclomatic Complexity is : 1+ 1 = 2.

 

Thanks,

Samrat.

Thank you Samrat for the valuable answer..

 

 

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service