代码覆盖率仅显示测试dll的覆盖范围。我想要在我测试的服务中覆盖源dll。
按照以下步骤操作: 1.仪器化二进制文件: “C:\ Program Files(x86)\ Microsoft Visual Studio 11.0 \ Team Tools \ Performance Tools \ x64 \ vsinstr.exe”%% f / COVERAGE
所有的BINARIES都是仪表。
Stared Perf Monitor “c:\ Program Files(x86)\ Microsoft Visual Studio 11.0 \ Team Tools \ Performance Tools \ x64 \ vsperfmon”/ coverage /output:"C:/inetpub/wwwroot/Service/bin/Test.coverage“/ crosssession / user : “每个人”
跑完测试 “C:\ Program Files(x86)\ Microsoft Visual Studio 11.0 \ Common7 \ IDE \ CommonExtensions \ Microsoft \ TestWindow \ vstest.console.exe”“C:\ inetpub \ wwwroot \ Service \ bin \ ApiTest.dll”/ UseVsixExtensions: True /Settings:"XMLFile1.runsettings“/ TestCaseFilter:”Name = MyTestCase“/ logger:trx / Platform:x64 / inIsolation / enablecodecoverage
TEST RAN SUCCESSFULLY