Questions tagged [opencover]

OpenCover is a code coverage tool for .NET and currently supports .NET 2, 3 and 4

OpenCover is a new attempt to build a code coverage utility to try and address some of the issues that have been encountered whilst maintaining PartCover.

The main aims of this project are:

  • Provide 32 and 64 bit support for .NET2 and .NET4
  • Better generics handling, though PartCover has been upgraded to handle .NET4 and generics (in both .NET2 and 4) it isn't pretty.
  • Simpler coverage handling
  • Better test support - the ultimate aim is to use the information to show what tests currently cover the code being worked on i.e. would it be possible to run those tests first and then the rest of the tests to provide faster feedback during development.
266 questions
3
votes
0 answers

Missing code coverage and lines of code in sonarqube using opencover for a c# project

I am using the sonarqube with opencover to generate the coverage report for a c# project. The problem that I have is that the Code coverage is empty and Lines of code display 0: Sonarqube project details. But when I use the reportgenerator to…
Andrei
  • 31
  • 3
3
votes
1 answer

OpenCover Cannot instrument .exe as no PDB/MDB could be loaded

I have a ASP.NET Core project(target to .NETFramework,Version=v4.6.1) that was working under VS2015. When I converted to VS2017 I am not able to make OpenCover working. When build.PS1 runs C:\OpenCover\4.6.519\tools\OpenCover.Console.exe…
Michael Freidgeim
  • 26,542
  • 16
  • 152
  • 170
3
votes
1 answer

OpenCover - To generate coverage.xml using OpenCoverUI in VisualStudio Community 2015

I have downloaded and installed OpenCoverUI in VisualStudio Community 2015. I have written unit tests. When I execute open cover from visual studio I get OpenCover Results with code coverage in visual studio. But Now I want generate a HTML Report…
user2301
  • 1,857
  • 6
  • 32
  • 63
3
votes
1 answer

OpenCover not covering actual source code

I am trying to use open cover to generate code coverage reports for my project, but it only covers test classes, not the source ones that I want. I am using the following command to run my tests: "C:\Program Files…
SalysBruoga
  • 875
  • 1
  • 9
  • 21
3
votes
1 answer

Unit test not showing up in SonarQube

Using Jenkins I am trying to pass the result of the Nunit task and the OpenCover task to SonarQube. SonarQube displays properly the test coverage but there is no trace of unit test results. Here is what I do : Build Visual Studio project with…
jBravo
  • 873
  • 1
  • 9
  • 28
3
votes
2 answers

OpenCover testing tool usage in Visual Studio 2013

I am trying to use OpenCover for a calculator application, written in C#. I have opened it in Visual Studio 2013 and installed the OpenCover and Report Generation packages using the package manager console. I cannot understand the other commands to…
Sandun Chathuranga
  • 2,242
  • 2
  • 13
  • 27
3
votes
1 answer

OpenCover - measuring coverage against running ASP.NET application

I'd like to measure the coverage from UI integration tests, so I need to apply OpenCover to the running ASP.NET application, not the test execution. (I already got coverage for unit tests by running OpenCover on VSTest.Console.Exe.) When I launch…
wrschneider
  • 17,913
  • 16
  • 96
  • 176
3
votes
0 answers

How to get full branch coverage of C#'s async/await using nunit and opencover

In c#, async and await are turned into a state machine at compile time. My problem is hitting each piece of the state machine. I've decompiled the code and ran my exact same unit test against it to find out which branch I'm missing. 49 …
Daniel McMullen
  • 336
  • 3
  • 8
3
votes
2 answers

Branch coverage with foreach?

I've got a simple method that calculate the total from a collection. public void MethodToTest(Collection collection) { int sum = 0; foreach (int value in collection) { sum += value; } } The goal is to get a 100% at…
oxman
  • 33
  • 1
  • 4
3
votes
0 answers

NCover vs OpenCover Accuracy

I have been recently comparing .NET test coverage tools NCover and OpenCover. It seems that NCover reports higher code coverage percentage than OpenCover. Has anyone done any Proof of Concept to determine which tool has greater accuracy in code…
MikeJPR
  • 764
  • 3
  • 14
3
votes
2 answers

Jenkins - NUnit/MSTest Code Coverage Graph

Is it possible to produce a graph of code coverage v time in Jenkins for NUnit/MSTest? I can produce a code coverage report with OpenCover and ReportGenerator. I would prefer to be able to visualise this with a graph. The NUnit plugin only…
TheMagnificent11
  • 1,424
  • 4
  • 19
  • 40
3
votes
1 answer

transform opencover xml output to ncover xml

I need the ability to import opencover coverage results in to Jenkins to pull coverage trending data over time. It appears that the best way to do this is going to be finding a way to convert the opencover xml format to ncover format, and then use…
user561818
  • 33
  • 1
  • 5
3
votes
1 answer

OpenCover - cannot find PDB

I am having some trouble getting OpenCover to work I have the following folder structure \Tools \Tools\Nunit \Tools\OpenCover \Buildartifacts When my code compiles, all the compiled code is generated into the BuildArtifacts folder. This includes…
Darren Guy
  • 1,123
  • 2
  • 13
  • 39
3
votes
1 answer

(sonar with gallio and) opencover, code coverage: 0%

I'm working with sonar having Gallio using OpenCover, it gives me a code coverage of 0% although there are test classes and my machine takes about 15 seconds to try to run the tests (at least it seems like that), after which they're summed up with…
user1829860
  • 111
  • 1
  • 10
3
votes
1 answer

Integrating OpenCover with xUnit

I am relatively new to the Visual Studio IDE and working on a C# project for which I am using xUnit framework to do testing. I have planned to use the "OpenCover" tool for determining the code coverage. Could someone tell me how to integrate this…
inquisitive
  • 1,558
  • 4
  • 16
  • 22