Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to render Code Coverage HTML results in the "Code Coverage" tab in Azure DevOps

I have a classic build pipeline in Azure DevOps that builds and run tests for a .Net Core 3.1 app. I am using self-hosted build agents running Windows Server 2019 OS

Below is the pipeline screenshot enter image description here

My tasks:

  1. Restore Nuget
  2. Build the solution in release mode
  3. Install latest vstest.console.exe tool
  4. Run tests using above tool and generate .coverage file
  5. Install CodeCoverage.exe from Nuget
  6. PowerShell script to convert .coverage to .xml
  7. Using ReportGenerator task to generate HTML and Cobertura (HTMLInline;HTMLChart;Cobertura)
  8. Publish the code coverage results to the server using Cobertura.xml from step 7 and also uploading HTML report folder

Publish Code Coverage Task enter image description here The HTML report directory is generated by ReportGenerator task.

Build runs successfully Publish Code Coverage task log enter image description here

Build run summary

enter image description here

Published files by the build

enter image description here

Code Coverage tab

enter image description here

Issue: The code coverage tab does not display the HTML reports

like image 308
Pradeep Avatar asked Aug 14 '26 09:08

Pradeep


1 Answers

This is a known issue on Azure devops. Now, we could only download the report, and open it with Visual Studio.

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, this issue 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.

In addition, I found a similar case and I have tested via the answer, set the code coverage tool to Cobertura, then I get the code coverage report in the Azure DevOps pipeline.

enter image description here

like image 122
Vito Liu Avatar answered Aug 17 '26 01:08

Vito Liu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!