Renuka Mulay
Renuka Mulay

Reputation: 45

CodeCoverage results not showing in Azure DevOps even though .coverage file is created

I am trying to setup code coverage on Azure Piplelines.
I enabled it in the YAML file and can see that the .coverage file is created but it doesn't show the details in the CodeCoverage tab in Azure DevOps.
I believe it needs an html file to be generated. My project is in C#.

My yaml file has the following test tasks.

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'
    codeCoverageEnabled: true
    runSettingsFile: 'src/ProjectName.runsettings'

Here is the result: Azure Devops screenshot

Can someone provide some guidance?

Upvotes: 3

Views: 1465

Answers (1)

Leo Liu
Leo Liu

Reputation: 76760

CodeCoverage results not showing in Azure DevOps even though .coverage file is created

This is a known issue on Azure devops. Now, we could only download the report.

Azure devops only support the download link for .coverage files currently. The white page you see is a UI glitch. This scenario is only supposed to render a download link to the coverage file.

Besides, it has been submitted in this earlier suggestion ticket linked here:

support vstest .coverage "code coverage" build results tab

This feature request is On Roadmap, I believe it will be released soon, you can follow this thread to know its latest feedback.

Hope this helps.

Upvotes: 2

Related Questions