Aşağıdaki kurulum var: Aşağıdaki satırı çalıştığındavstest.console.exe çalışır, ancak iyi bir dosya adıyla, CodeCoverage.exe herhangi sonuçlar vermez değil
set __vsTestConsoleExe=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
set __codeCoverageExe=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe
set __testFile=My.UnitTests.dll
REM Below I get a ".coverage" file with the correct coverage. But the file name is kinda-random
"%__vsTestConsoleExe%" "%__testFile%" /InIsolation /EnableCodeCoverage
PAUSE
REM Below I get a big ole nothing
"%__codeCoverageExe%" collect /output:DynamicCodeCoverage.coverage "%__vsTestConsoleExe%" "%__testFile%" /InIsolation /EnableCodeCoverage
"%__codeCoverageExe%" analyze /output:DynamicCodeCoverage.coveragexml DynamicCodeCoverage.coverage
:
"%__vsTestConsoleExe%" "%__testFile%" /InIsolation /EnableCodeCoverage
Ben iyi .coverage dosyasını almak, ama onun bir oluşturulan dosya adı gibi:
MyUSERNAME_MYMACHINE 2016-03-24 16_03_20.coverage
(ilk kod bloğunda) PAUSE deyiminden sonra hatlar kapsama toplanmalı gibi görünüyorlar (ve not, ben aynı "% __ vsTestConsoleExe%" 'comamand veririm ....... ama ondan büyük bir şey yok.
Neyi yanlış yapıyorum?