microsoft / ProtocolTestFramework
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 463 units with 6,609 lines of code in units (68.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 11 medium complex units (787 lines of code)
    • 53 simple units (1,792 lines of code)
    • 399 very simple units (4,030 lines of code)
0% | 0% | 11% | 27% | 60%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cs0% | 0% | 11% | 27% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/TestFramework/Core0% | 0% | 16% | 26% | 57%
src/TestFramework/Core/Adapters0% | 0% | 19% | 24% | 55%
src/TestFramework.AdapterConsole0% | 0% | 31% | 26% | 42%
src/TestFramework/VSTS0% | 0% | 11% | 17% | 71%
src/PTFTestLogger0% | 0% | 16% | 8% | 75%
src/TestFramework/Core/Logging0% | 0% | 0% | 34% | 65%
src/TestFramework/VSTS/Checking0% | 0% | 0% | 37% | 62%
src/TestFramework/Messages0% | 0% | 0% | 31% | 68%
src/TestFramework/Core/Attributes0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private static void MergePropertyAndGroup()
in src/TestFramework/Core/ConfigurationReader.cs
85 20 3
public virtual T GetAdapter()
in src/TestFramework/Core/DefaultTestSite.cs
86 15 0
private List GetCaptureFilesPath()
in src/PTFTestLogger/TxtToJSON.cs
51 14 0
protected override object ExecuteMethod()
in src/TestFramework/Core/Adapters/PowerShellAdapterProxy.cs
85 14 2
private XmlDocument MergeConfigFiles()
in src/TestFramework/Core/ConfigurationReader.cs
96 14 1
private int Expect()
in src/TestFramework/Core/ProtocolTestsManager.cs
71 13 6
internal static object ParseResult()
in src/TestFramework.AdapterConsole/ConsoleHelper.cs
71 12 2
internal static object ParseResult()
in src/TestFramework/Core/Adapters/AdapterProxyHelpers.cs
71 12 2
protected override object ExecuteMethod()
in src/TestFramework/Core/Adapters/ShellAdapterProxy.cs
79 12 2
public void SetSwitch()
in src/TestFramework/VSTS/PtfTestClassBase.cs
56 12 2
public void EndTransaction()
in src/TestFramework/Core/ProtocolTestsManager.cs
36 11 1
protected static string ReplaceInvalidChars()
in src/TestFramework/Core/Logging/LogSink.cs
21 10 1
public static void AssertAreEqual()
in src/TestFramework/Core/TestManagerHelpers.cs
34 10 4
private void GenerateException()
in src/TestFramework/VSTS/Checking/DefaultChecker.cs
34 10 3
private static void AppendOrOverrideChild()
in src/TestFramework/Core/ConfigurationReader.cs
45 9 3
private static TestResult PtfTestOutcomeToTestResult()
in src/TestFramework/Core/Logging/LogProviders.cs
34 9 1
private static TestStatus PtfTestOutcomeToTestStatus()
in src/TestFramework/Core/Logging/LogProviders.cs
24 9 1
private static void Describe()
in src/TestFramework/Core/ProtocolTestsManager.cs
36 9 3
public static IList GetMethodsByAttribute()
in src/TestFramework/Core/TestToolHelpers.cs
37 9 3
public override string ToString()
in src/TestFramework/Messages/AvailableReturn.cs
37 9 0