See which of your colleagues or former colleagues are already on Testing Link: Check out the Contact Finder
News »Browse Articles » Cyclomatic Complexity
0
Vote Vote

Cyclomatic Complexity

Views 2 Views    Comments 0 Comments    Share Share    Posted 01-09-2009  
Cyclomatic complexity is a software metric (measurement). It was developed by Thomas McCabe and is used to measure the complexity of a program. It directly measures the number of linearly independent paths through a program`s source code.

The concept, although not the method, is somewhat similar to that of general text complexity measured by the Flesch-Kincaid Readability Test.

Cyclomatic complexity is computed using a graph that describes the control flow of the program. The nodes of the graph correspond to the commands of a program. A directed edge connects two nodes if the second command might be executed immediately after the first command.

Definition


M = E − N + 2P
where

M = cyclomatic complexity
E = the number of edges of the graph
N = the number of nodes of the graph
P = the number of connected components.

Source:
http://www.onestoptesting.com/cyclomatic-complexity/definition.asp
0
Vote  Vote
Enter your comment:
No Comments For This News

Search News

What's the News?

Post a link to something interesting from another site, or submit your own original writing for the Testing community to read.

Most Popular News

Most Recent User Submitted News