I'm trying to generate a code coverage report using the build pipeline for the C# unit tests (MSTest2). Report can be generated using the Reportgenerator.exe but expects .xml file as the input. I have added the Visual Studio test task which has generated a .coverage file in the build artifact. We could use CodeCoverage.exe to convert .coverage to .xml file.
To test this locally, I have copied the .coverage file and on running:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Dynamic Code Coverage Tools\amd64>CodeCoverage collect /IIS /session:WebSession /output:'C:\CoverageFiles\test.coverage'
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Dynamic Code Coverage Tools\amd64>CodeCoverage analyze /output:'c:\CoverageFiles\results.xml' 'c:\CoverageFiles\test.coverage'
the script is not throwing any error and xml file is also not generated.
Is there any other way to generate the .xml file from .coverage file? Any help on this is appreciated.