抱歉,几天前刚开始用这个。我也在努力让-coverbytest发挥作用。
下面是我为获得结果而运行的两个命令。我尝试并重新阅读了这些文档,发现命令行的用法相互矛盾。OpenCover在系统路径中。我只想运行集成测试。我还复制了一个测试,以确保对两个相同的测试执行相同的代码。这应该会产生所覆盖的图标(针状图片看到),但我没有得到统计。任何帮助都将不胜感激。伟大的工具BTW。我得到的统计数据,只是不包括德茨的测试。
"-target:C:\Repo\ThirdParty\NUnit.Runners.2.6.4\tools\nunit-console.exe“OpenCover.Console.exe -register:user "-filter:+BusinessLayer** -coverbytest:+Test*”-targetargs:/no影子C:\Repo\UnitTests\Server\BusinessLayer.Tests\bin\Debug\BusinessLayerTests.dll /include:IntegrationTests“-output:reports.xml”
C:\Repo\ThirdParty\ReportGenerator.2.3.5.0\tools\ReportGenerator.exe "-reports:TestResult.xml;reports.xml“"-targetdir:C:\Repo\UnitTests\Server\BusinessLayer.Tests\CodeCoverage”"-historydir:C:\Repo\UnitTests\Server\BusinessLayer.Tests\CodeCoverage\History“"-reporttypes:Html;HtmlSummary”
发布于 2015-12-18 21:28:01
我总是用"-coverbytest:*“。对我来说挺好的。您确定您的引号是正确的( -filter和-coverbytest之间的引号可能缺少)吗?你应该试着:
OpenCover.Console.exe -register:user "-filter:+[BusinessLayer*]*" "-coverbytest:*" "-target:C:\Repo\ThirdParty\NUnit.Runners.2.6.4\tools\nunit-console.exe" "-targetargs:/noshadow C:\Repo\UnitTests\Server\BusinessLayer.Tests\bin\Debug\BusinessLayerTests.dll /include:IntegrationTests" "-output:reports.xml"https://stackoverflow.com/questions/34356065
复制相似问题