Only coverage for test classes in opencover

爷,独闯天下 提交于 2019-12-23 09:49:38

问题


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?

来源:https://stackoverflow.com/questions/13272914/only-coverage-for-test-classes-in-opencover

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!