More than 150 default code rules to check against best practices. Support for Code Query over LINQ (CQLinq) to easily write custom rules and query code.
NDepend gathers code coverage data from NCover, OpenCover, dotCover and Visual Studio. From this data, NDepend infers some metrics on methods, types, namespaces and assemblies : PercentageCoverage, NbLinesOfCodeCovered, NbLinesOfCodeNotCovered and BranchCoverage (from NCover and OpenCover only).
These metrics can be used conjointly with others NDepend features. For example you can know what code have been added or refactored since the last release and is not thoroughly covered by tests. You can write a CQLinq rule to continuously check that a set of classes is 100% covered. You can list which complex methods need more tests.
Another unique usage of code coverage data in NDepend is viusalizing code coverage through the code metric view. See a screenshot below of the metric view on the NDepend code base:
- Rectangle are methods of the code base.
- Each rectangle area is proportional to the #lines of code of the method.
- and the rectangle color is defined by the percentage coverage by tests of the method.
See an online demo about how to harness test coverage data (3mn).
NDepend and Code Coverage FAQ
Make the most of your test coverage data
Are you sure your added and refactored code is covered by tests?
Dealing with code uncoverable by tests
High Test Coverage Ratio is a good thing, Anyway!