I have the following setup:
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
when the following line is executed:
"%__vsTestConsoleExe%" "%__testFile%" /InIsolation /EnableCodeCoverage
I get a good .coverage file, but its generated file name looks like:
MyUSERNAME_MYMACHINE 2016-03-24 16_03_20.coverage
The lines after the PAUSE statement (in the first block of code) look like they should collect the cover (and note, I give it the same "% __ vsTestConsoleExe%" comamand ......., but I get nothing from this.
What am I doing wrong?
visual-studio visual-studio-2015 code-coverage mstest
granadaCoder
source share