question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to publish the code coverage result with a .coverage file?

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

48reactions
av-millercommented, Nov 21, 2018

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

2reactions
pjquirkcommented, Oct 6, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found