5

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 -register:user -target:"$(nunitpath)/nunit-console-x86.exe" -targetargs:"/noshadow Viewer_Tests.dll /domain:single" -filter:+[*]* -output:coverage.xml

ReportGenerator.exe coverage.xml "coveragereport" html

If I look in the generated report I find only the test classes listed, not the main classes.

Here is the console output of the opencover command.

Committing...
Visited Classes 5 of 5 (100)
Visited Methods 41 of 41 (100)
Visited Points 482 of 557 (86.5350089766607)
Visited Branches 6 of 12 (50)

==== Alternative Results (includes all methods including those without corresponding source) ====
Alternative Visited Classes 5 of 5 (100)
Alternative Visited Methods 44 of 44 (100)

How can I make opencover to cover the Viewer.dll too?

sheidrich
  • 51
  • 3
  • In the XML that opencover produces - it lists all the classes/modules it encountered and reasons why it skipped them. Does it notice the Viewer.dll module and if so what does it say? – Shaun Wilde Nov 07 '12 at 21:44
  • I've checked the coverage.xml and it lists the Viewer.dll but skipped it due to missing pdb. But the Viewer.pdb exists in the same directory. – sheidrich Nov 08 '12 at 08:52
  • Very odd - Raise the issue with OpenCover with a repeatable sample. – Shaun Wilde Nov 08 '12 at 22:23
  • Have you found any solution for this problem? – abu Apr 30 '14 at 13:24

0 Answers0