Join the social network of Tech Nerds, increase skill rank, get work, manage projects...

• # Cyclomatic Complexity

• 0
• 0
• 0
• 0
• 0
• 0
• 0
• 0
• 256
Comment on it

Cyclomatic complexity metric was firstly introduced by Thomas J. McCabe in 1976,  based on control flow representation of the program.

• It is used to refer the complexity of the program(source code).
• It is a measure of  the number of independent paths in a source code of the program that is correlated to n number of coding errors.
• The number of linearly- independent paths through a program is measured  using control flow graph to calculate the cyclomatic complexity.
• It is calculated as reference to classes, method's, modules and function within a program.

Cyclomatic Complexity V(G) = E- N+2

Where E= Total no. of edge in the flow graph
N= Number of nodes in the flow graph

### Properties of Cyclomatic complexity:

• Maximum number of independent path are equal to V(G)
• Cyclomatic complexity can be equal to 1 or more than 1.
• If cycolmatic complexity equal to 1 then graph will have one path.
• Complexity Number 1-10 represents that code is written in good structured way and efforts and costs are low.
• If complexity number is 10-20  means  complex code and cost and effort is medium
• If complexity number is 20-40 means Very complex code and cost and effort is high
• If complexity number is >40 means cost and effort is very high

### How useful is:

• In white box testing, basis path testing ensures to execute atleast one statement during testing
• To determine the total number of test cases required for complete coverage of the module.

## 0 Comment(s)

OR
OR
Register

OR
Fill out the form below and instructions to reset your password will be emailed to you:

• Hire
• Post Projects

### Post Projects

• All at 0 Cost ....
• Post Tech Job
• Select Best Bidder
• Track the Project
• Approve Work and Pay safely
• Browse Nerds
• Work
• Find Projects Find Projects
• UI Design and UX
• Software Engineering
View more...
View less...
• Marketing
• General
• Manage
• Company Company

### Manage Company

• All at 0 Cost ....
• Manage Company and Employee Profiles
• Company wide Employee Productivity Reports
• Knowledge Sharing and Collaboration Tools
• Get Sales Lead and Bid for Tech Projects
• Send Invoices and Receive Payment Safely
• Learn
• Nerd Digest Nerd Digest
• UI Design and UX
• Software Engineering
View more...
View less...
• Marketing
• General
• Tech Q & A Tech Q & A
• UI Design and UX
• Software Engineering
View more...
View less...
• Marketing
• General