无论我选择什么目标,开放式封面的输出始终显示(coverage.xml(的组件:
<ModulePath>C:UsersXXX.nugetpackagesxunit.runner.utility2.2.0-beta2-build3300libnetstandard1.1xunit.runner.utility.dotnet.dll</ModulePath>
<ModuleTime>2016-06-27T13:43:52Z</ModuleTime>
<ModuleName>xunit.runner.utility.dotnet</ModuleName>
我的批处理文件:
@echo off
SET dotnet="C:/Program Files/dotnet/dotnet.exe"
SET opencover=C:UsersXXX.nugetpackagesOpenCover4.6.519toolsOpenCover.Console.exe
SET targetargs="test c:SfmcAdaptertrunkdotnet_coresfmc_adaptertestSFMC.Adapter.Service.Tests"
SET filter="+[*]*"
SET coveragefile=Coverage.xml
SET coveragedir=Coverage
REM Run code coverage analysis
%opencover% -oldStyle -register:user -target:%dotnet% -output:%coveragefile% -targetargs:%targetargs% -filter:%filter% -skipautoprops -hideskipped:All
我希望它可以拿起我的装配覆盖范围,而不是Xunit组件。
我已经弄清楚了,请确保在project.json
文件中debugType
设置为完整。然后我能够看到覆盖范围。以前设置为"便携式"。
"debugType": "full"