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
0
votes
0 answers

Unable to get code coverage using OpenCover for Selenium webdriver

I have been trying to get code coverage of my web application using OpenCover. We have automated tests using Selenium Webdriver written in MSTest. Planning to get code coverage of my web application using automated tests I tried below commands, but…
Sham
  • 830
  • 9
  • 27
0
votes
1 answer

FileNotFoundException/MissingMethodException when running XUnit tests under OpenCover

If I run my tests with this: OpenCover.Console.exe -target:"xunit.console.exe" -targetargs:"\"test1.dll\" \"test2\" -noshadow -noappdomain -xml \"xunit-test-results.xml\"" -filter:"-[XUnit]* -[Moq]*" -skipautoprops -register:path64…
Paulo Morgado
  • 14,111
  • 3
  • 31
  • 59
0
votes
0 answers

Issue in generating code coverage report for exe instead of dll using OpenCover

I have tried generating coverage report using OpenCover. It worked fine for DLLs but I have a console app that contains methods for which I have added a test project. For that, OpenCover is not generating a coverage report. Do I need to change the…
traveller
  • 39
  • 1
  • 7
0
votes
1 answer

NUnit3 throws exception System.Runtime, Version=4.2.0.0 not found while trying to run test in NUnit3 console

Environment: .Net Core 2.0 visual Studio Professional 2017 NUnit3 OpenCover (For code coverage) ReportGenerator(For code coverage report) Hi Nunit Team, I am pretty familiar with MS Test framework and have worked on that extensively but was testing…
Rahul
  • 76,197
  • 13
  • 71
  • 125
0
votes
2 answers

How to correctly configure SonarQube Scanner for MSBuild with OpenCover

I have a .NET solution with bunch of projects. I wan to analyze the project with SonarQube, and show unit tests details. I'm using NUnit for tests and OpenCover to generate coverage reports. I have a simple batch file to run the required SonarQube…
Arghya C
  • 9,805
  • 2
  • 47
  • 66
0
votes
1 answer

How can I know the percentage of my code(say .cs file) covered by my unit test using OpenCover and ReportGenerator?

I am using Opencover and Reportgenerator to find out the code coverage of my C# project. Currently I am able to get 100% coverage for my unit test but I want to know how much code has been covered by unit test file (I think there is a way in…
Krishna Prasad S
  • 141
  • 2
  • 17
0
votes
1 answer

Jenkins - OpenCover batch command cant find pdb files

I am trying to follow these instructions for my system and am as far as step 8 (unit tests & coverage). When I execute this command on the server it works succesfully: "C:\Program Files (x86)\OpenCover\OpenCover.Console.exe" -register:user…
Lobsterpants
  • 1,188
  • 2
  • 13
  • 33
0
votes
1 answer

Doing code coverage for XSLT template (NUnit)

Currently i am using Nunit, and use OpenCover to do code coverage for all my csharp (.cs) file. But some of the Nunit Test Case contains XSLT transformation in .xslt template. Any expert here know if there is any way I can do code coverage for XSLT…
Su Beng Keong
  • 1,034
  • 1
  • 13
  • 30
0
votes
3 answers

AppVeyor + OpenCover + xUnit - Build doesn't fail when tests fail

I created an AppVeyor Build Script that uses OpenCover and Coveralls.Net to run my xUnit tests and publish the code coverage to Coveralls.io. But when I have failing tests - AppVeyor reports the build successful. How do I configure AppVeyor to fail…
Philip Pittle
  • 11,821
  • 8
  • 59
  • 123
0
votes
0 answers

Opencover test coverage Asp.Net application

I am trying to generate test coverage on asp.net web application. I am using Nunit and have created test project. I am running following command "OpenCover.Console.exe" -output:"coverage_ui.xml" -register:user -target:"nunit3-console.exe"…
0
votes
1 answer

test results summary in Axo cover Report generator

I am using AxoCover code coverage tool for generating the code coverage report in visual studio. I wanted to include unit test results [pass\fail] in the unit test report summary. Is it possible? I am using visual studio 2017 Professional. enter…
0
votes
1 answer

Building Roslyn and generate PDB files

Our company needs to generate OpenCover report for all the open source products we are using. One of them is Roslyn compiler. I'm not very good at either Roslyn or OpenCover, but as far as I understand, I need pdb files to generate cover report. The…
Davita
  • 8,928
  • 14
  • 67
  • 119
0
votes
1 answer

OpenCover and NUnit GUI

I'm trying to use NUnit-Gui with OpenCover. To do it I'm starting the OpenCover with NUnit-Gui as main process, with the command as follow: C:\OpenCover\OpenCover.Console.exe -target:"C:\Nunit\nunit-gui.exe" -register:user…
0
votes
1 answer

How to exclude Class Properties in OpenCover?

For example I have a simple POCO like so: public class Customer { public int Age { get; set; } } I want to exclude the properties that follow this pattern. Note that I cannot exclude the whole class because in future I might add a method that…
lbrahim
  • 3,710
  • 12
  • 57
  • 95
0
votes
0 answers

Running Opencover and ReportGenerator in Docker container

Im trying to run opencover and reportgenerator for an asp.net core application using this image microsoft/aspnetcore-build:2.0.0 , I have an opencover powershell script, and want to install powershell for linux inside the container to run that…