Questions tagged [dotcover]

dotCover is a tool for code coverage and continuous testing of .NET code. It integrates with Visual Studio, or can run coverage analysis on a Continuous Integration server.

JetBrains dotCover is a .NET code coverage analysis and continuous testing tool that:

  • Calculates code coverage in .NET and .NET Core applications.
  • Integrates into Visual Studio.
  • Highlights covered and uncovered code right in Visual Studio.
  • Shows which unit tests cover a particular piece of code.
  • Can run unit tests in Visual Studio on demand or continuously.
  • Supports popular unit testing frameworks including MSTest, NUnit, xUnit, and MSpec.
  • Provides a console utility to use with a Continuous Integration server. dotCover coverage analysis engine is available in JetBrains TeamCity out of the box.
  • Can fetch server-side coverage analysis results from TeamCity to Visual Studio.
  • Generates code coverage reports as XML, XML for NDepend, HTML, or JSON.
203 questions
56
votes
3 answers

How do I exclude types and methods from being covered by dotCover in TeamCity?

I've got an existing C# 4 project which I've checked the test coverage for by using TestDriven.Net and the Visual Studio coverage feature, i.e. Test With -> Coverage from the context menu. The project contains some code I don't want covered, and…
Martin R-L
  • 3,939
  • 2
  • 25
  • 27
43
votes
9 answers

Visual Studio Test Explorer window will not open

For some reason I can't open the test explorer window in Visual Studio 2012. I click Test->Windows->Test Explorer and nothing happens... This problem may have been caused by recently uninstalling DotCover. I did this because my licence expired and…
24
votes
10 answers

How to test or exclude private unreachable code from code coverage

I have a bunch of assemblies with near 100% test coverage but I often run into a situation like in the example below. I cannot test the default switch case, which is there to guard against future bugs where I add more items to the enum but forget to…
Jakob Möllås
  • 4,043
  • 3
  • 27
  • 58
23
votes
3 answers

DotCover: How to remove code coverage highlighting from your code

I am using JetBrains' dotCover for writing my units tests in a .NET application. dotCover highlights the whole code base either green or red based on the code coverage, but I want to remove the highlights after I'm done checking the code coverage.…
NvMat
  • 938
  • 11
  • 19
16
votes
1 answer

How can I exclude namespaces in code coverage with Team City?

I am using Team City 7.1.1 (build 24074), and I would like to exclude some namespaces in code coverage. I am using dotcover as code coverage tool. I am using MSPec, Machine.Fakes and Rhino Mocks in my tests. Thanks!
cdiazal
  • 856
  • 11
  • 28
14
votes
2 answers

Code coverage for a class library using dotCover

I have a simple class library that gets tested with MSTest using VS 2010. I installed the trial version of dotCover 1.2. with no ReSharper installed. VS only has the menu items "Cover Startup Project" and "Cover Application". They open boxes where I…
Mathias F
  • 14,815
  • 19
  • 82
  • 151
13
votes
1 answer

What does own coverage mean in dotCover?

As the title says in some classes there's an own coverage line included as example: What does this mean?
FireEmerald
  • 509
  • 6
  • 14
13
votes
4 answers

DotCover in TeamCity 8 doesn't work

I try to run dotCover with my NUnit tests, in the TeamCity 8 as a build step. But no metter what I try I always get the same error in the log file: Step 4/4: Coverage (NUnit) (1s) [Step 4/4] Starting:…
domderen
  • 623
  • 9
  • 22
13
votes
2 answers

Weird test coverage results for iterator block, why are these statements not executed?

I'm using dotCover to analyze code coverage of my unit tests, and I'm getting some strange results... I have an iterator method for which the coverage is not complete, but the statements that are not covered are just the closing braces at the end of…
Thomas Levesque
  • 270,447
  • 59
  • 580
  • 726
12
votes
7 answers

TeamCity dotCover report path for Sonar

I'm trying to integrate the sonar analysis into by TeamCity build process. I have a NUnit build step which runs my unit tests and then runs dotCover for the coverage. My next step is the sonar-runner. The configuration that currently exists is;…
Dipesh
  • 1,203
  • 1
  • 11
  • 12
10
votes
2 answers

How do I get both test detail and coverage using NUnit and dotCover?

I'm running dotCover with NUnit3 to get coverage reports on our build server. We also need the detail output from NUnit to show the test results. Is there any way to get both the NUnit test detail and the files for dotCover without running NUnit…
Richard Schaefer
  • 385
  • 2
  • 12
  • 40
9
votes
1 answer

How to integrate dotcover and Jenkins

How to integrate dotcover and Jenkis. Any PDF or Guide? I was able to run the dot cover through command line and it generate test results. However when I try to run in Jenkins through windows batch command it throws an error as Command 'cover'…
9
votes
2 answers

Attribute filter syntax for code coverage in TeamCity

Anyone knows the syntax for excluding code from coverage in Teamcity? I am using the ExcludeFromCodeCoverageAttribute on certain methods and want those excluded. It works well in Visual Studio but I don't understand how to get the same behavior in…
Konstantin
  • 3,328
  • 2
  • 30
  • 44
8
votes
3 answers

Code Coverage in .Net Core 2.0

How can I generate code coverage in .Net Core 2.0? I tried the following: "TestPlatform\vstest.console.exe" --collect:"Code Coverage" But I got this error message: Data collector 'Code Coverage' message: Cannot find CodeCoverage.exe. I tried…
samdinesh
  • 137
  • 1
  • 3
  • 9
8
votes
1 answer

How to integrate the dotcover HTML reports with sonarqube 4.5?

I have been struggling with this issue. I have been able to generate the HTML reports with the help of DotCover. Also, I have given the path of the reports in the Sonar Portal too under Project Settings--> C# --> CodeCoverage --> DotCoverReportPath…
1
2 3
13 14