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.
211 questions
3
votes
1 answer

dotCover not generating coverage for all assemblies

I've set up dotCover to run using an .xml c:\dotcover\xunit\xunit.console.exe "INWK.Configuration.UnitTests.dll" …
ShaneKm
  • 20,823
  • 43
  • 167
  • 296
3
votes
2 answers

ReSharper dotcover showing 0% coverage despite tests running through code

I'm assuming this is an error on my part but I can't figure out why ReSharper dotcover is showing my test coverage of certain queries (and commands too) as 0%. So I have a .NET Core CQRS API that is made up of a lot of EF Core LINQ. Below is a…
Ben Thomson
  • 1,083
  • 13
  • 29
3
votes
1 answer

When using dotCover in a TeamCity build configuration, is there an environment variable for code coverage percentage?

When using TeamCity to manage .net projects, we like to use dotCover to evaluate our code coverage. In the past using NCover, there was a way to retrieve the code coverage percentage using an environment variable. We liked this and we would set…
shanabus
  • 12,989
  • 6
  • 52
  • 78
3
votes
1 answer

Why does enabling JetBrains dotCover cause NUnit test to fail?

I wrote some code that looks like the following, to unit-test the implementation of a C# finalizer method. In TeamCity version 2017.1.3, I use a build step with the NUnit runner type to run this test using NUnit.ConsoleRunner.3.7.0. The test fails…
hwaien
  • 493
  • 1
  • 3
  • 14
3
votes
1 answer

SonarQube for .Net project, code coverage not excluding file marked with "ExcludeFromCodeCoverage"

I have a .Net project and I have recently integrated Sonar to measure the code coverage but the Coverage is very low compared to coverage that I see in DotCover. When I checked in details, found that SonarQube is still counting the C# classes marked…
CHash11
  • 746
  • 4
  • 14
  • 31
3
votes
0 answers

dotCover Nunit over command line

I'm trying to run dotCover over command line. It's working fine with VisualStudio2010 but its not working over command line. I get the error: "Either assembly contains no tests or proper test driver has not been found." enter image description…
Lino556
  • 133
  • 1
  • 9
3
votes
1 answer

StackOverflowException with JetBrains dotCover in TeamCity

I use TeamCity to support continuous integration of a project. Currently, when I run .NET Code Coverage: JetBrains dotCover for a specific project then the dotCover crashes with StackOverflowException. Also, the unit test 'TestSomething' is correct…
3
votes
1 answer

Running dotCover Console Runner with MsTest

I partially found a solution to mstest with arguments: https://devnet.jetbrains.com/thread/471980 Command Prompt (Works ok): dotcover analyse /TargetExecutable="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MsTest.exe"…
ShaneKm
  • 20,823
  • 43
  • 167
  • 296
3
votes
1 answer

dotCover: Compare code coverage before and after refactor

We've just done a large refactor to a project. I would like to use dotCover to compare the test coverage before and after this change, to make sure that we haven't inadvertently removed still-required unit tests. The only possiblility I can see is…
Chris
  • 5,882
  • 2
  • 32
  • 57
3
votes
0 answers

NUnit build step in TeamCity takes 4 times longer with dotCover analysis enabled

I have a build configuration on my TeamCity server that compiles the solution in one step and then runs about 1650 tests using an NUnit build step. When the NUnit build step runs without coverage analysis it runs all the tests in about 25…
Nanhydrin
  • 4,332
  • 2
  • 38
  • 51
3
votes
0 answers

[dotCover]DotCover missing coverage for the referenced source DLL

I just started using dotCover,been almost two days but no results. I have a test project 'A' with all the TCs based on unit framework,I have added the code assembly as reference assembly in my project assembly 'B' When I build and run the test…
3
votes
2 answers

TeamCity 9.0.1 - not all assemblies show in Coverage Breakdown

I have a Visual Studio solution consisting of several projects. I set a build process for it in TeamCity, and I have added a an NUnit runner build step, with these settings: nunit runner 2.6.3 run tests from:…
dopoto
  • 1,124
  • 1
  • 10
  • 20
3
votes
1 answer

dotCover and xUnit not gathering coverage statistics in some environments

We're using dotCover 2.7 and xUnit.net 1.9.2. On my machine (Windows 7) and a co-worker's machine (Windows 8) we can run dotCover from the command line against one of our unit test assemblies that uses xUnit.net and get correct coverage…
Craig W.
  • 17,838
  • 6
  • 49
  • 82
3
votes
1 answer

Understanding the coverage summary for dotCover in TeamCity

I'm running dotCover coverage in Teamcity. After the build it constructs the coverage report in which you can drill down to individual class coverage. I have a class containing 1 method that produces the following summary. Class, % 100% (1/1) …
PaulB
  • 23,264
  • 14
  • 56
  • 75
3
votes
1 answer

Issue running code coverage with dotCover in release mode

Has anyone successfully run coverage reporting using dotCover (and ideally TeamCity) while targeting release mode in the application? Here's the error message I received (this configuration works in debug mode): Generate dotCover report…
Danny Douglass
  • 390
  • 1
  • 11