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
1
vote
3 answers

Using Gallio with OpenCover coverage-report file contais result but Sonar reports 0%

I have the problem that the code coverage for some reason aren't presented in Sonar. The result of the unit tests is performed and showed correctly but not the result of the code coverage. The project is build by Jenkins. I have registered the…
Dan
  • 11
  • 2
1
vote
1 answer

OpenCover Isn't Passing Arguments to NUnit

I just grabbed NUnit, NUnit Runners, and OpenCover from Nuget. The NUnit parts are running great, both in GUI and console mode. But in PowerShell I can't seem to get OpenCover to work properly. Following various examples of usage, I ended up with…
David
  • 208,112
  • 36
  • 198
  • 279
1
vote
1 answer

Can OpenCover get code coverage with Microsoft.Moles.Runner and Nunit?

I'm using OpenCover with Visual Studio2010 professional. It works well with NUnit on a command-line. OpenCover.Console.exe -register:user -target:"C:\bin\NUnit 2.6\bin\nunit-console.exe"…
axt_star
  • 33
  • 5
1
vote
3 answers

Gallio 64bit Plattform and 32bit dll Sonar and OpenCover BadImageException

We using Gallio for test execution. All projects under test and all test projects are compiled as 32bit Version. The Buildserver is Win2008 R2 64bit. Gallio is installed as 32bit version. Gallio is startet through Sonar. As coverageTool we use…
1
vote
2 answers

Opencover & Production

If I use opencover to provide coverage anaylsis that runs on the buildserver for all builds of my product. I'm under the impression that opencover (and presumably all the others) "instrument" the code to record hits. Is this instrumented code "not…
Tim Bailey
  • 571
  • 1
  • 3
  • 15
1
vote
2 answers

OpenCover report analysis

I am using OpenCover for calculating code coverage, I am getting the following xml response.
user1130157
  • 113
  • 3
  • 12
0
votes
1 answer

How would I get full OpenCover branch coverage for these code examples?

I want to test the following two (unrelated) methods and achieve full branch and statement coverage using OpenCover 2.0.802.1 public class Methods { public static void MethodWithDelegate(SynchronizationContext context) { …
g t
  • 7,287
  • 7
  • 50
  • 85
0
votes
1 answer

OpenCover -register parameter causing unhandled exception

when I use the -register option in Opencover I get a unhandled exception C:\hudson\jobs\SPIN.Accounts.AccountNode\workspace>"C:\Program Files (x86)\OpenCover\OpenCover.Console.exe" -target:"C:\Program Files (x86)\NUnit…
limmy
  • 73
  • 1
  • 7
0
votes
0 answers

OpenCover CodeCoverage support for IIS 10 and Windows 2016 Server?

We are trying to get functional coverage for our .NET Core application using Open Cover. Able to get coverage with dotnet command as well as application executable running in local machine setup. In one of the server, we have hosted the website and…
LazyHazy
  • 1
  • 1
0
votes
1 answer

Why isn't opencover writing to the specified output file?

I'm running OpenCover with the following command line (wrapped for clarity) from an Admin Console. packages\OpenCover.1.0.625\OpenCover.Console.exe -register:user -target:packages\NUnit.2.5.10.11092\tools\nunit-console.exe …
Greg B
  • 14,597
  • 18
  • 87
  • 141
0
votes
0 answers

What's the difference between alternative visited and just visited in the opencover?

Committing... Visited Classes 0 of 18 (0) Visited Methods 0 of 68 (0) Visited Points 0 of 133 (0) Visited Branches 0 of 74 (0) ==== Alternative Results (includes all methods including those without corresponding source) ==== Alternative Visited…
KH P
  • 1
  • 1
0
votes
1 answer

File coverage tab is always loading and never shows coverage files when using OpenCover plugin in Jenkins

Background I'm using OpenCover 4.7.1221 to run vstest.console.exe in a Jenkins pipeline via bat script in a steps block to generate a coverage.xml file. Then, I'm running the Code Coverage API plugin with the OpenCover plugin adapter…
user2063351
  • 503
  • 2
  • 13
  • 31
0
votes
0 answers

IIS Workerprocess crashed

I'm working on a Asp.net web application code base and I have installed OpenCover 4.7.1221 version and using command prompt Administrator mode I executed a command to generate a code coverage report in a Windows Server 2012 R2 server and after few…
0
votes
1 answer

No Coverage for Moles Tests on x64 Windows Server 2003

For some reason OpenCover is not covering tests using moles on Windows Server 2003 (64bit). I raised a similar question which solved it on my 32bit Windows 7 machine, but for some reason setting the Environment Variable on the Windows Server machine…
Jack
  • 2,153
  • 5
  • 28
  • 43
0
votes
1 answer

No Code Coverage Information for Tests Using Moles

I have been getting used to OpenCover over the past few days, and have I noticed that tests using Moles do not generate any Coverage information. I have created a small solution to isolate the problem, and have found that code coverage is generated…
Jack
  • 2,153
  • 5
  • 28
  • 43