Compatible ReSharper versions: up to 8.2.1
dotCover is a .NET unit testing and code coverage tool
that works right
in Visual Studio, provides great ways to visualize code coverage information, and is Continuous Integration ready. Read on for more details.
.NET Code Coverage Analysis
dotCover calculates and reports statement-level code coverage in .NET Framework 2.0 to 4.5 applications, as well as in
dotCover makes sure that developers know to what extent their code is covered with unit tests. It also helps QA engineers test software products as thoroughly as possible.
Currently dotCover integrates into four versions of the IDE: Visual Studio 2005, 2008, 2010, 2012 and 2013.
Running and Managing Unit Tests
dotCover comes bundled with a unit test runner that it shares with another JetBrains .NET developer tool, ReSharper.
The runner works in Visual Studio, allows managing unit tests through sessions, and supports multiple unit testing frameworks: MSTest, NUnit, xUnit, and MSpec.
Coverage Highlighting in Visual Studio
To visualize coverage data, dotCover can highlight covered and uncovered lines of code right in Visual Studio code editor.
Specific colors that dotCover uses for this highlighting can be configured to match your preferences.
Filtering and Excluding Nodes
Sometimes, you don't want to know coverage data solution-wide. For example, you may not be interested in coverage statistics for code marked with ObsoleteAttribute or a specific legacy project.
In this case you can set global or solution-specific coverage filters based on project, namespace, type, or type member names. Attribute filters are also available that restrict gathering coverage information to code marked (or not marked) with certain attributes.
Alternatively, if you already have coverage data collected, you can choose to exclude a specific node from the coverage tree. As soon as you do this, dotCover will instantly recalculate coverage statistics.
Multiple Report Formats
dotCover helps process coverage data the way you need. Exporting to several formats, including HTML, XML, JSON, and XML for NDepend enables you to share coverage reports with the rest of the team or pass coverage information to external services.
Visual Studio Integration
dotCover is a plug-in to Visual Studio, giving you the advantage of analyzing and visualizing code coverage without leaving the code editor.
Unit Test Coverage
A major use case of dotCover is analyzing unit test
Next to unit test run results, dotCover displays a coverage tree showing how thoroughly a particular project, namespace, type, or type member is covered with unit tests.
Navigation to Covering Tests
dotCover provides a shortcut to detect which tests cover a particular location in code. You can navigate from a pop-up that lists covering tests to any of these tests.
Additionally, you can instantly run them or add to an existing unit test session.
Code Coverage for Manual Testing
As an alternative to unit test coverage, dotCover can run coverage analysis upon .NET applications executed from Visual Studio.
This enables a QA engineer to execute a use-case scenario and examine what parts of the code where actually executed during this use-case. Saving and merging coverage snapshots supports executing non-trivial test cases.
Continuous Coverage Analysis
dotCover is a great fit with Continuous Integration servers, most prominently JetBrains' own product, TeamCity.
First of all, via TeamCity add-in to Visual Studio, dotCover is able to obtain coverage data from a TeamCity server — without running coverage analysis on a local machine.
On the other hand, dotCover coveage analysis engine is bundled with into a free version of TeamCity, which helps schedule coverage runs as part of Continuous Integration process and generating server-side coverage reports.