About dotCover

A code coverage tool for .NET developers.

dotCover is a code coverage tool that reports statement-level coverage in .NET and Silverlight applications. dotCover highlights covered and uncovered code in Visual Studio by generating XML-based code coverage reports. dotCover detects which tests cover a particular location in code and integrates with ReSharper's unit testing tools. It comes with a console utility to use with a continuous integration server. dotCover can aggregate data from multiple coverage sessions and merging snapshots. dotCover extends the JetBrains .NET tools family that already includes ReSharper and dotTrace.

dotCover Features:

  • dotCover integrates with ReSharper test runner and Visual Studio
  • dotCover adds to ReSharper's unit testing toolset 
  • You can analyze coverage using ReSharper's unit testing context menu 
  • dotCover can also analyze Visual Studio projects without ReSharper installed 
  • dotCover highlights covered and uncovered lines right in Visual Studio 
  • dotCover detects which tests cover a particular location in code

dotCover: Code Coverage for .NET

Testing code for coverage with dotCover
Similar to dotTrace, dotCover works with ReSharper. When you install dotCover, you see several options appear in the ReSharper menu options as well as the Test Runner window. First of all, under ReSharper | Unit Tests menu option, there is a new option to run coverage reports, either for specific tests or for the entire solution. Similarly, the Test Runner Window offers us the same options. You get a new icon to run tests under coverage, as well as a new tab that will display the output of the coverage report. Based on the information you want to obtain, you can run coverage reports on the entire solution or only certain tests. Running on the entire solution will give you a measurement of how much of yout entire code base is covered. In order to do so, you can select Cover All Tests from Solution. You can assign whatever keyboard shortcut you want to this action by selecting the ReSharper_UnitTest_CoverSolution command. Executing the command will run the unit tests and once completed will then proceed to run a coverage report. You can also run coverage on individual tests or classes, by selecting them and choosing to Cover with dotCover. The window groups coverage reports based on the option selected in the drop-down list. dotCover provides you with two measurements: percentage of code covered and number of statements.