1

代码覆盖率仅显示测试 dll 的覆盖率。我想要我正在测试的服务中源 dll 的覆盖率。

遵循以下步骤: 1. 检测二进制文件:“C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools\x64\vsinstr.exe”%%f /COVERAGE

所有的二进制文件都被检测了。

  1. 盯着 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" /跨会话/用户:“每个人”

  2. 运行测试 "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

测试成功

  1. 停止监视器 cd c:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools\x64 vsperfcmd.exe /shutdown
4

0 回答 0