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

OpenCover takes much longer to run than the nunit-console

I'm trying to add unit tests to this project: https://github.com/JimBobSquarePants/ImageProcessor When running the unit tests, they take maybe 1 or 2 minutes to run (it's an image processing library, and I don't expect them to be insanely fast). The…
thomasb
  • 5,816
  • 10
  • 57
  • 92
2
votes
1 answer

Sonar runner works fine for .NET projects in command-line, but reports missing PDBs in Jenkins

I'm using Sonar with OpenCover to collect code coverage info of my C# projects using Jenkins as the CI system. Sobar server is v4.3 and the runner is versioned 2.3 on the test machine. The tricky part is: when I run sonar runner from the command…
ted6914
  • 31
  • 3
2
votes
1 answer

OpenCover running on a 64bits TeamCity agent

We're migrating our TeamCity agents from 32bits systems to 64bits and some builds started to fail due to an error in OpenCover. This is the stacktrace: E:/BuildAgent/work/7777662cc87ae003/tools/opencover/opencover.console.exe -returntargetcode…
Marcelo Oliveira
  • 653
  • 5
  • 16
2
votes
1 answer

Missing PDB in Open Cover

below is the Line of code I am writing to execute open Cover
Shashi
  • 67
  • 1
  • 7
2
votes
2 answers

OpenCover without running unit tests

Is it possible to run opencover without running unit tests? I have the TestResults.xml from NUnit and want to pass this to OpenCover without running the unit tests again. Is this possible?
Chris
  • 43
  • 4
2
votes
1 answer

Why Opencover with MSTest does not execute and says "access is denied"?

I am using open cover with MSTest. I am a new users and trying to get hang of Opencover. I have tried with MSTest and MSTest is working fine with my new project in Vs2010. When I am executing following test using MStest it is working fine: Command…
Pushkaraj
  • 62
  • 8
2
votes
1 answer

OpenCover cannot find PDB when using symbolic links?

In our output tree, the Test directory only contains symbolic links (Win7 x64) pointing to DLLs in various build directories. Next to each of these DLLs in the actual build directory is a corresponding PDB file. However, when running OpenCover on…
elora
  • 451
  • 1
  • 3
  • 14
2
votes
1 answer

Add multiple exclusion filters to OpenCover

I know how I can add 1 exclusion filter but, what if I want to exclude multiple projects at one? Do I repeat the "-" statement? or is it comma separated? Particularly, I'm trying to exclude Tests and Installer from the coverage…
user1552485
  • 53
  • 2
  • 6
1
vote
2 answers

OpenCover showing 0 lines covered with mstest

'here is output...' Loading C:\TEMP\BankDemo_mstest\Test_BankDemo\bin\Debug\Test_BankDemo.dll... Starting execution... Results Top Level Tests ------- --------------- Error …
sureshp
  • 13
  • 6
1
vote
1 answer

Filtering code coverage by calling function in OpenCover

I have some integration tests written for MsTest. The integration tests have the following structure: [TestClass] public class When_Doing_Some_Stuff { [TestInitialize] protected override void TestInitialize() { // create the…
cvlad
  • 608
  • 1
  • 6
  • 17
1
vote
0 answers

OpenCover 4.7.1221 Size of the xml output file more then OpenCover 4.6.166

I am just checking by executing single test case for Mstest framework for Dotnet 4.6 based assembly test case. It is generating more size compared to 4.6.166 version C:\Users\xxx\.nuget\packages\opencover\4.7.1221\tools\OpenCover.Console.exe …
1
vote
0 answers

openCover reporting unexpectedly low coverage

I have the following code: var isDuplicateCategoryIds = _query.Categories .GroupBy(x => x.Id) .Any(g => g.Count() > 1); I have two tests that invoke this code, one where there are duplicate Ids and one where there are not. However,…
David Masters
  • 8,069
  • 2
  • 44
  • 75
1
vote
1 answer

OpenCover.Console.exe - Incorrect Arguments: The argument 'xxx.' is not recognised

I am implementing CodeCov for code coverage in c# with Visual Studio 2019 and I am using OpenCover and Xunit. My solution has two projects (Crossroads and CrossroadsUnitTests) I have added the required nuget packages to the solution (OpenCover,…
John Erbynn
  • 355
  • 1
  • 4
  • 14
1
vote
1 answer

Exclude directories from coverage in AxoCover coverage report

I have Project for which I am using AxoCover for coverage report. After the test cases are successfully passed the coverage report is generated and the coverage% for Classes, Methods, Branches, and Lines are given. In the coverage process, it is…
Rana
  • 53
  • 1
  • 8
1
vote
2 answers

How to import nUnit/OpenCover results to SonarQube

We are running SonarQube Community Edition Version 7.9.1 (build 27448) (the currently latest docker image) I have some nUnit tests but I'm struggling to get the code coverage data imported to SonarQube. I have successfully used SonarScanner.MSBuild…
mattumotu
  • 1,436
  • 2
  • 14
  • 35