【发布时间】:2020-11-19 23:59:32
【问题描述】:
我有一个项目,其中包含要测试的类和方法。我有另一个项目,其中包含将测试我的主项目的方法的测试方法。
我使用 opencover 运行测试,并使用 reportgenerator 生成报告,使用 .bet 文件中的以下命令:
..\tools\OpenCover.Console.exe -register:user -target:"C:\myDllWithTests.dll" -output:"c:\coverage\opencovertests.xml"
.\ReportGenerator.exe "-reports:c:\coverage\opencovertests.xml" "-targetdir:c:\coverage\opencovertests.xml\reports"
我正在使用 MSTest 进行测试。
问题是在 html 报告中,我看到覆盖的代码是测试方法,而不是我的测试主项目中的方法。
如何在结果中添加主要方法?
谢谢。
【问题讨论】:
标签: c# code-coverage mstest opencover