What Is Cyclomatic Complexity?

by Nataliia Vasylyna | March 8, 2017 7:04 am

Metrics plays an important part in the field of software development and software testing. Software metric is a qualitative measure of particular system aspects with regard to the product cost, size and quality.

The notion of cyclomatic complexity is connected with software metric. It defines the program complexity. This parameter was developed by Thomas J. McCabe in 1976. The control flow representation of the program is the basis for this notion. In this case, a program is a graph that includes:

Mathematically, it can be calculated with the help of such a formula – V(G)=E-N+2, where

For the specialists who perform mobile testing, software program testing, web testing and desktop testing, cyclomatic complexity equals the number of test cases. This matric is suitable for white box testing[1].

What Is the Purpose of Cyclomatic Complexity?

A set of special tools for defining cyclomatic complexity is available. They are devMetrics, NDepends, GMetrics, OCLint, etc.

Learn more from QATestLab

Related Posts:

Endnotes:
  1. white box testing: https://qatestlab.com/services/No-Documentation/white-box-testing/
  2. What Is API Testing?: https://blog.qatestlab.com/2017/03/15/application-programming-interface/
  3. Alpha Testing vs Beta Testing: https://blog.qatestlab.com/2017/03/10/alpha-beta-testing/
  4. ‘Rainbow’ Box Testing: https://blog.qatestlab.com/2016/12/28/rainbow-box-testing/

Source URL: https://blog.qatestlab.com/2017/03/08/cyclomatic-complexity-notion/