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
45
votes
2 answers

What is the difference between using Full and Portable for .net core projects?

To generate open cover report I have to make debugType as Full. I generate report on build server as I have to fail the build if the coverage doesn't reach a certain threshold. The build is generated in Release mode. What consequence does keeping…
Viraj Pangam
  • 469
  • 1
  • 4
  • 4
42
votes
5 answers

How do I use OpenCover and ReportGenerator to view Unit Test Coverage Results?

I'm a noob to using both OpenCover and ReportGenerator and I'm struggling a bit in understanding how to get them working. I'm using VS.NET 2012 'Professional' which means I don't have access to the built in unit test coverage tooling. I also have…
atconway
  • 20,624
  • 30
  • 159
  • 229
19
votes
2 answers

How to add filters to OpenCover tool to skip some of the classes in a namespace

How can I add filters to skip some of the classes in a namespace/assembly. For example: SYM.UI is the base assembly and i want to skip SYM.UI.ViewModels. Writing the below filter but it is including all of them and not fulfilling my…
Ravindra
  • 191
  • 1
  • 1
  • 3
17
votes
3 answers

Opencover with multiple assemblies

I am trying to combine three unit testing projects (three different dlls) into one OpenCover report. Is it possible? I tried to look into filters but I don't see enough detail (examples) in the OpenCover Wiki site. Can someone shed some lights on…
Kyle
  • 406
  • 7
  • 20
11
votes
1 answer

No result with opencover + xunit

I was trying to use OpenCover (downloaded today) to get coverage of my tests. Here is the command line I've used : OpenCover.Console.exe -target:"c:\Programmes2\xunit\xunit.console.clr4.x86.exe"…
Sebastien F.
  • 1,613
  • 2
  • 23
  • 40
10
votes
3 answers

Open cover generates no output on coverage details

trying to run the open cover as below opencover.console.exe -target:"C:\Users\rkapiset\Downloads\xunit-1.8\xunit.console.clr4.x86.exe" -targetargs:"""E:\Office\CRM\dotnet\1 - UI\EYC.CRM.UI.Tests\bin\Debug\EYC.CRM.UI.Tests.dll""" -filter:+[EYC]*…
Ravindra
  • 101
  • 1
  • 1
  • 3
10
votes
3 answers

OpenCover generates an empty report

I am using OpenCover to determine code coverage for a simple C# project. The problem Although I can see MSTest running the unit tests (and succeeding) the generated report is empty. Details This is the command I am using: opencover.console.exe…
Emond
  • 50,210
  • 11
  • 84
  • 115
10
votes
3 answers

OpenCover: possible to merge multiple reports into one?

I'm using OpenCover to generate functional test coverage for a web application. These tests are fairly long running (3+ hours), so we've chopped them up into multiple tests that run in parallel. So instead of a single coverage report, there are…
Mitch A
  • 2,050
  • 1
  • 21
  • 41
7
votes
2 answers

How to generate code coverage report for asp.net unit tests in Azure DevOps build

I need guidance in generating code coverage report of Asp.net unit tests in azure build pipeline. My project is based on .Net Framework 4.6. I am able to run all the unit tests using "visual studio test" task. I tried the "report generator" task,…
7
votes
3 answers

Improve speed openCover

We are currently running an OpenCover session, which is running the nunit3.console.exe. Our command line is the following: "C:\Program Files (x86)\OpenCover\OpenCover.Console.exe" -output:"%CD%\opencover.xml" -register:user -target:"C:\Program Files…
J4N
  • 19,480
  • 39
  • 187
  • 340
7
votes
3 answers

OpenCover/NUnit can't find PDB files

I'm using OpenCover http://nuget.org/packages/opencover and have written the following batch file to run the unit tests and generate code coverage stats: echo off echo *************************** echo *** Running NUnit tests *** echo…
magritte
  • 7,396
  • 10
  • 59
  • 79
7
votes
1 answer

How to exclude classes from an OpenCover report

In generating coverage reports with OpenCover (and then generating an HTML report with ReportGenerator) for an MSTest suite, I am trying to exclude framework generated classes. In particular, classes generated under the project's namespace by a…
Michael
  • 1,306
  • 1
  • 12
  • 30
7
votes
2 answers

Is there a way to retrieve code coverage metrics generated from OpenCover back to Jenkins?

I'm working on a .NET project that uses Jenkins as the CI server. The server is working as it's supposed to but now I'm trying to make it emit alerts in case of low code coverage. The approach that I'm trying is to use Sonar to execute NUnit and…
Matheus
  • 763
  • 1
  • 7
  • 11
6
votes
2 answers

Make OpenCover reports available in CruiseControl.NET

I'm trying to integrate OpenCover with CruiseControl.NET. At this point I've modified by build system so it runs my nunit tests under OpenCover. I then generate Xml and Html reports from those using ReportGenerator. Assuming it's possible to…
Kaleb Pederson
  • 45,767
  • 19
  • 102
  • 147
6
votes
3 answers

error: opencover not found. please select the open cover executable

I am using the plugin code cover in visual studio 2015 community to know the code coverage of the code projects. When I tried to use the plugin I received this error message: "pen cover not found. Please select the open cover executable." I've…
1
2 3
17 18