How to publish the code coverage result with a .coverage file?
See original GitHub issueI am working on a .net core 2.0 project. With the latest version of Visual Studio agent, I can collect the code coverage with a command like below:
"C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" /framework:".NETCoreApp,Version=v1.1" /collect:"Code Coverage" "G:\tmp\trial\bin\Debug\netcoreapp1.1\trial.dll
The command generates a .coverage file which can be opened in Visual Studio. But how can I publish the result in vsts? It seems the Publish Code Coverage task of vsts doesn’t understand this file.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Publish code coverage results v1 task - Microsoft Learn
The publish code coverage results task generates and publishes the HTML report, which is a set of HTML files that are linked from...
Read more >The Easiest Way to Generate and Publish .NET Code ...
Code coverage can be collected by adding --collect "Code coverage" option to the command line arguments. This is currently only available on the ......
Read more >Publish Code Coverage result Azure DevOps - Stack Overflow
Using vstest. console.exe I am converting the coverage file to xml and using report generator to publish the code coverage result.
Read more >how to view Code Coverage report on Azure DevOps - Code4IT
Create a task of type PublishCodeCoverageResults@1, specify that the result format is Cobertura, and then specify the location of the file to be ......
Read more >VSTest task unable to publish coverage report in build pipelines
coverage file manually to .coveragexml file then feed it to "ReportGenerator" task and then publish it using "publish code codecoverage" task. But this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is funny that M$ VSTS does not support M$ VS coverage report publishing but supports Java counterparts. Way to go Microsoft. Solid logic there
The Publish Code Coverage task only supports Cobertura and JaCoCo output.
See this thread and comment for details on using the Visual Studio Test task to generate and publish the code coverage.