opencover icon indicating copy to clipboard operation
opencover copied to clipboard

OpenCover code coverage not working for QA selenium automation tests over IIS application

Open DKumar91 opened this issue 4 years ago • 0 comments

Please provide the following information when submitting an issue.

Where appropriate replace the [ ] with a [X]

My Framework

  • [ ] .NET 2
  • [ ] .NET 3.5
  • [ ] .NET 4
  • [ ] .NET 4.5
  • [ ] .NET 4.6
  • [ ] .NET 4.6.1
  • [ ] .NET 4.6.2
  • [ ] .NET 4.7
  • [ ] .NET 4.7.1
  • [X] .NET 4.7.2
  • [ ] .NET Core 1.0.0
  • [ ] .NET Core 2.0.0
  • [ ] Something else

My Environment

  • [ ] Windows 7 or below (not truly supported due to EOL)
  • [ ] Windows 8
  • [ ] Windows 8.1
  • [X] Windows 10
  • [ ] Windows 10 IoT Core
  • [ ] Windows Server 2012
  • [ ] Windows Server 2012 R2
  • [ ] Windows Server 2016

I have already...

  • [X] repeated the problem using the latest stable release of OpenCover.
  • [ ] reviewed the usage guide and usage document.
  • [ ] have looked at the opencover output xml file in an attempt to resolve the issue.
  • [ ] reviewed the current issues to check that the issue isn't already known.

My issue is related to (check only those which apply):

  • [X] no coverage being recorded
  • [ ] 32 or 64 bit support
  • [ ] feature request

Expected Behavior

Report for code coverage of dev code when running selenium tests

Actual Behavior

Report with empty results are generated

Steps to reproduce the problem:

  • [ ] reviewed the usage guide and usage document again because we know you probably didn't do it the first time.
  • [X] sample code or link to repository/gist is available (support is much faster this way) https://github.com/DKumar91/CodeCoverageDemo

When running below command, OpenCover.Console.exe -target:"C:\Program Files\IIS Express\iisexpress.exe" -targetdir:"C:\Users\dinesh.kumar\Documents\codecoverage\CodeCoverageDemoProject1\WebApplication3\bin" -targetargs:/config:"C:\Users\dinesh.kumar\Documents\codecoverage\CodeCoverageDemoProject1.vs\CodeCoverageDemoProject1\config\applicationhost.config" -output:"C:\Users\dinesh.kumar\Documents\codecoverage\CodeCoverageDemoProject1\cc1.xml" -register:user

below output is returned Committing... No results, this could be for a number of reasons. The most common reasons are: 1) missing PDBs for the assemblies that match the filter please review the output file and refer to the Usage guide (Usage.rtf) about filters. 2) the profiler may not be registered correctly, please refer to the Usage guide and the -register switch. image

Kindly help me in resolving this issue Step-by-step actions would be much better Also, please provide me the information about how to make opencover to run the selenium test on the application which I have hosted in my local IIS and make it generate reports accordingly.

DKumar91 avatar Apr 03 '20 12:04 DKumar91