It's not possible to define a filename and path for the .coverage file.
Make a CodeCoverage with /EnableCodeCoverage and try to define a path and a name for the .coverage file.
A file with a user defined name in a user defined path
A random filename in a random foldersystem.
Windows Server / Windows 10
Team Foundation Server 2018 Patch 3.2
VsTest 16.0.1
@singhsarab @ShreyasRmsft Any one working on this issue? Can I try?
@krishnaanaril Sure, feel free to give it a shot.
@CSmith1111 While going through the source code I found that it is possible to provide filename by adding <CoverageFileName>YourName.coverage</CoverageFileName>in the *.runsettings file.
@CSmith1111 While going through the source code I found that it is possible to provide filename by adding
<CoverageFileName>YourName.coverage</CoverageFileName>in the *.runsettings file.
what if a runsettings file isn't used, is it possible to supply this at the command line? I mean, is it as simple as /p:CoverageFileName=output.coverage? I tried something just as a guess at the prompt and it didn't work as I am supposing here.
@jakubch1
All properties from *.runsettings can be specified through command line with [-- <RunSettings arguments>]
Examples:
vstest.console.exe *.dll /EnableCodeCoverage -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.CoverageFileName="my.coverage"
For .NET Core:
dotnet test --collect:"Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.CoverageFileName="my.coverage"
More info:
https://github.com/microsoft/vstest-docs/blob/master/docs/configure.md#using-command-line
Most helpful comment
@singhsarab @ShreyasRmsft Any one working on this issue? Can I try?