1
votes

I'm using Microsoft Unit Tests to validate my solutions via Azure DevOps Pipelines. I am able to see tests being executed and the % of code coverage

enter image description here

However, I can't see the code coverage results (or they won't render)...

enter image description here

Here is my publish code coverage task - am I missing something to have it render here?

enter image description here

1
What is the log output from the "Publish code coverage" task ? And what tool are you using to generate the code coverage? You selected JaCoCo, but this is a Java tool.Preben Huybrechts
Hi GT, is there an update on this question? If the answer could give you some help, we could accept it as answer. In this case, others could directly find the useful solution. If not, please feel free to share your question here.Vito Liu
Hey - sorry got sidetracked. Would like to see this completed on the Roadmap (as listed below). I haven't had a chance to try out the below solution yet - thanks for the update.GT.
Hi GT, not get your latest information, is the answer below helpful for you? Or if you have any concern, feel free to share it here.Vito Liu
Hi GT, Have you tried the answer shared below? If this solution is helpful to you. You could accept your answer. In this case, others could directly find the useful solution. Thanks.Vito Liu

1 Answers

2
votes

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, we 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