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

Code/Branch Coverage tool for Visual Studio 2015

I'm looking for way to get code coverage in Visual Studio 2015 Community edition. I wasn't able to find a free tool for VS2013, so wondering if anything new has happened in VS2015. I'm currently using OpenCover but that doesn't color my code like…
Snæbjørn
  • 10,322
  • 14
  • 65
  • 124
6
votes
1 answer

OpenCover filter not yielding any results

I cannot get the filter parameter in Open cover working, even if I try a very simple console app with tests. Here is the filter - I am running as adminstrator This: "C:\Users\Mojo\AppData\Local\Apps\OpenCover\OpenCover.Console.exe" …
KnowHoper
  • 4,352
  • 3
  • 39
  • 54
6
votes
3 answers

Is it possible to import OpenCover /result in SonarQube?

I'm currently changing things to our Sonar setup since Gallio isn't supported anymore by C# Ecosystem 3. I already successfully imported the unit test coverage by using OpenCover with following command. "C:\Program Files…
Nicholas
  • 1,189
  • 4
  • 20
  • 40
6
votes
1 answer

How can I fail a TeamCity build if dotCover doesn't report a high enough result?

I would like TeamCity to run my mSpec tests and report on the code covered by the tests. I would also like TeamCity to report that a build has failed if code coverage in certain namespaces doesn't meet a threshold (e.g. MyProduct.ImportantStuff must…
Steve Dunn
  • 21,044
  • 11
  • 62
  • 87
5
votes
1 answer

Why do assemblies with the SecurityTransparent attribute cause instrumented code via a profiler to throw a VerificationException?

It seems when I instrument an assembly using OpenCover, assemblies with the SecurityTransparent attribute (and AllowPartiallyTrustedCallers it seems) will throw a VerificationException. I'd like to know why that is and if there is an alternative…
Shaun Wilde
  • 8,228
  • 4
  • 36
  • 56
5
votes
1 answer

Can Opencover be used with TypeMock Isolator?

I'm looking for a .NET coverage tool, and had been trying out PartCover, with mixed success. I see that OpenCover is intended to replace PartCover, but I've so far been unable to link it with TypeMock Isolator so my mocked-out tests pass while…
Blair Conrad
  • 233,004
  • 25
  • 132
  • 111
5
votes
1 answer

DotCover Cobertura or OpenCover XML

I have a dotcover coverage report generated using dotcover.exe. I want to integrate the report in Jenkins and show the coverage. How can I generate a cobertura or openclover xml from it?
irusul
  • 201
  • 1
  • 14
5
votes
1 answer

OpenCover Reports missing pdbs when pdbs are present (XUnit/.NET Core)

I'm using OpenCover to generate test coverage reports for my projects, but it's not generating any data. Checking in my logs, it's showing "missing pdb" for the dlls in question, however the pdbs are available in the same directory. Things I've…
Richard Matheson
  • 1,125
  • 10
  • 24
5
votes
1 answer

Visual Studio Professional 2015 Test Coverage

I'm trying to configure opencover with Visual Studio 2015 Professional edition. I use Visual Studio In Build MS Test tool for Unit testing. I have a few challenges on this , 1.First I have installed opencover Version 4.6.519 Then report generator…
Viduru
  • 83
  • 5
5
votes
4 answers

Display OpenCover results in TFS 2015 build Summary

I have generated my xml coverage file as part of CI build on the TFS server using vNext 2015 build definition. How would one display the results in the TFS 2015 summary ? Either using the xml report or the html generated using the ReportGenerator.
Orn Kristjansson
  • 3,435
  • 4
  • 26
  • 40
5
votes
0 answers

Only coverage for test classes in opencover

I have a problem to get the coverage from my classes with opencover. I have a Viewer.dll with the main classes and a Viewer_Test.dll with the tests for the viewer. After executing the commands all tests run as expected. OpenCover.Console.exe…
sheidrich
  • 51
  • 3
5
votes
1 answer

How do I run OpenCover + NUnit in TeamCity without running all unit tests twice?

I set up OpenCover in my MSBuild script, setup the ReportGenerator, and have it output as an artifact and have a custom tab - all of that works great. Here is my MSBuild target:
NightOwl888
  • 55,572
  • 24
  • 139
  • 212
4
votes
1 answer

OpenCover Output with MSTest analyses same assembly twice

I've been having a first go at using opencover for a current project, and have just got it working with my mstest project. I am having a problem though, in that the opencover output xml appears to trying to analyse the same assembly twice. Also…
Matt Whetton
  • 6,616
  • 5
  • 36
  • 57
4
votes
2 answers

Branch coverage for expressions in OpenCover

Does branch coverage work on the following statement? I expected a red indicator because the first expression only has tests where it is false and not true. tax.Voided = P_tax.Amount == 1012312870000.42M || P_tax.Amount < 0.00M; The first…
Ryan Andres
  • 312
  • 3
  • 13
4
votes
4 answers

Is a thread-safe queue a good approach?

I am looking for a way to optimize the following code, for an open source project that I develop, or make it more performant by moving the heavy work to another thread. void ProfilerCommunication::AddVisitPoint(ULONG uniqueId) { …
Shaun Wilde
  • 8,228
  • 4
  • 36
  • 56
1
2
3
17 18