NDepend.API Documentation
PercentageBranchCoverage Property
NDepend.CodeModel Namespace > IMethod Interface : PercentageBranchCoverage Property
Gets a numeric nullable value measuring the percentage of branch coverage by tests for this method.
Syntax
Nullable<byte> PercentageBranchCoverage {get;}
Remarks
Branch coverage is a more accurate measure of code coverage than ICodeContainer.PercentageCoverage because it compensates for method complexity.
Since branch coverage is generated from the underlying opcodes, it often does not map cleanly to source code.
This means that it might be difficult to take branch coverage values and determine how to write tests that will improve coverage.

Availability:
Branch coverage is only available if your coverage data are imported from NCover coverage files and if the metric NbLinesOfCode is available for this method.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

IMethod Interface
IMethod Members