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
4
votes
1 answer

OpenCover MSBuild Integration - No results generated

After getting OpenCover to work on my machine, the next step is getting it to work with the build server. I've been trying to integrate OpenCover with MSBuild on a Bamboo Build Server. I have modified Build.proj as follows to run OpenCover after…
Jack
  • 2,153
  • 5
  • 28
  • 43
4
votes
0 answers

OpenCover coverage glitch?

I updated OpenCover version in the project and got the follwoing: How is this possible if the line #77 is covered? I understand that the code itself is not briliant but I am fine with a possible exception on that line #76. I have also another one…
Serg046
  • 1,043
  • 1
  • 13
  • 42
4
votes
1 answer

Test coverage 0% even with tests being executed (Opencover / xUnit)

I am using OpenCover to get the coverage of the tests in my application .Net Core When I run the OpenCover command, my tests are executed, but no classes are visited. Furthermore, my coverage is always 0. Total de testes: 2. Aprovados: 2. Com falha:…
Artur Quirino
  • 486
  • 6
  • 21
4
votes
0 answers

How to exclude a method using excludebyfile in OpenCover

I'm using AxoCover, which uses OpenCover to generate reports. The OpenCover usage for excludebyfile is -excludebyfile:[;][;] - Exclude a class (or methods) by filter(s) that match the filenames. An * can be used as a…
Mark_Gibson
  • 922
  • 1
  • 12
  • 32
4
votes
1 answer

xsi:type attribute messing up C# XML deserialization

I used XSD.exe to automatically generate C# objects based on the XML schemas (.xsd files). I'm deserializing OpenCover output, but one of the partial classes didn't get generated correctly. Here's the line that's causing the exception:
Kieran Paddock
  • 375
  • 1
  • 5
  • 15
4
votes
1 answer

OpenCover with Xunit Visited Classes 0 of 1

Am trying to integrated Xunit.net framework with opencover, When I try to get the code coverage for my dll, Opencover doesn't pick my dll, whereas Xunit its executing its summary and printing its…
Karthik
  • 307
  • 3
  • 15
4
votes
3 answers

Remove .Designer.cs files from OpenCover coverage reports

I'm using the White framework to write tests against my applications user interface. I'm then running them with OpenCover and using ReportGen to create a test coverage report. My only complaint with the result is that my reports combine both…
4
votes
2 answers

OpenCover Can't find file location

I'm trying run a build args against open cover but I can't find the file location since there are spaces in the location itself C:\Program Files (x86)\OpenCover\OpenCover.Console.exe -register:user…
Lewis
  • 2,373
  • 2
  • 22
  • 30
4
votes
2 answers

OpenCover does not cover under TeamCity

I have a project that does NOT give me any coverage in the output coverage file when running under TeamCity. When I run from the command line it covers fine. Apparently there is some permission problem with the local system account that is used…
Orn Kristjansson
  • 3,435
  • 4
  • 26
  • 40
3
votes
2 answers

OpenCover - how to view coverage per test?

On OpenCover github page I can see that OpenCover supports coverage by test ("Release 3 (coverage by test support, debug symbols"). The issue is, I don't know how to run OpenCover with this option. My workflow is to run unit tests with OpenCover and…
3
votes
2 answers

NUnit tests failing within OpenCover

My tests work just fine when executed directly with NUnit, but when executed through OpenCover (still with NUnit as the test runner), I get following errors: ProcessModel: Default DomainUsage: Single Execution Runtime:…
Matěj Zábský
  • 16,909
  • 15
  • 69
  • 114
3
votes
2 answers

Python ValueError: not enough values to unpack (expected 3, got 2)

I am getting python for, Code _, threshold = cv2.threshold(gray_roi, 3, 255, cv2.THRESH_BINARY_INV) _, contours, _ = cv2.findContours(threshold, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) contours = sorted(contours, key=lambda x: cv2.contourArea(x),…
Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256
3
votes
0 answers

Does OpenCover run tests in parallel? Is there an option to have it not?

I'm having some issues running OpenCover.console over some .NET assemblies. We're seeing some MSTEST tests fail, only when run under OpenCover. What's going on is that we have certain of our tests that are reading and writing to a LocalDB database.…
Jeff Dege
  • 11,190
  • 22
  • 96
  • 165
3
votes
2 answers

Code coverage results not getting updated with Branching in sonarqube

I am working on integrating sonarqube in Jenkins pipeline. I have enabled code coverage on sonarqube with opencover using sonar-csharp as per the documentation below https://docs.sonarqube.org/pages/viewpage.action?pageId=6389770 I am also using the…
3
votes
1 answer

OpenCover coverage with ASP.Net core 2.0

I'm trying to use OpenCover to generate a coverage report for the automated/manual testing performed on a web site (as in this link). I tried the following; Build the .net core 2 web app in the standalone mode and generate the exe. Use following…
mangun
  • 292
  • 1
  • 4
  • 16
1 2
3
17 18