Cyclomatic complexity represents the number of linearly independent paths through a program’s source code (i.e. the minimum ideal number of tests each testing a path).
There are two ways to calculate the cyclomatic complexity :
AWS Blu Insights implementation relies on Option 2 and is available for multiple languages. The cyclomatic complexity of any structured program with only one entry point and one exit point is equal to the number of decision points contained in that program plus one. The decision points are if, for, for-each, while, do, catch, and case statements. For each method in a program, we calculate this cyclomatic complexity, and the sum of the cyclomatic complexity of each method of a file gives the total cyclomatic complexity of the file. Each language has only certain types of files containing code (i.e if a file doesn’t contain code such as Images, its complexity will be 0.
On the Statistics tab of the Assets module, click on the “…” button on the upper right corner of the screen and select “Launch” in the complexity section. Pick up the technologies related to your codebase and hit the Launch button (Notice that if a classification is needed, this button is disabled).
When the metrics are available, the Cyclomatic Complexity column can be displayed on multiple pages such as Assets, Workpackages, and Test Scenarios. On each page, the values are consolidated at different levels.
Different charts can also be added to the dashboards: