![]() |
Cyclomatic Complexity Calculations ( CC )
Cyclomatic Complexity its a type of white box testing for Structural testing use under reference of code complexity.
Facts about why White Box Testing?
How Cyclomatic Complexity can help ?Cyclomatic Complexity provides answers to such a questions like :-
Steps in Determining Cyclomatic Complexity :-
http://imgs.g4estatic.com/cyclomatic...9296340374.png Example of Cyclomatic Complexity demonstration?In this post we will demonstrate how to calculate the Cyclomatic Complexity, in order to do the right calculations based on the following flow chart detailing the functions of Java application, which checks to see if a Person's username and password are correct before granting access to an online E-commerce site . http://imgs.g4estatic.com/cyclomatic...60ddeb8439.png First of all we will create a flow graph/diagram based on the flow chart above . So lets have a look what have we done here : http://imgs.g4estatic.com/cyclomatic...b37efde7eb.png Cyclomatic Complexity = number of edges - number of nodes + 2 = ( 7 - 5 ) +2 = 4 The Cyclomatic Complexity of this software application is 4 I hope i have made a bit of a good explanation of the CC in software testing and quality assurance, any information regarding to this post , please feel free to ask, although i didnt cover everything but the most important things ;) . With all kind regards Hisham Alssadi |
| All times are GMT +5.5. The time now is 09:25. |