Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: Code Coverage Tab: how to force link original Cobertura ReportGenerator Report #50

Open
poojashahms opened this issue Mar 24, 2023 · 1 comment

Comments

@poojashahms
Copy link
Contributor

poojashahms commented Mar 24, 2023

In my pipeline, I have coverage.xml of cobertura style using reportgenerator
which has hyperlinks to visualize the missing coverage in actual code files.

Example:
image
image

image
image

Problem

When I enable diff coverage using CoveragePublisher and azurepipelines-coverage.yml file. I start seeing a different report which is not useful for my case because it doesn't have the navigation feature to the visuals.

image

In both the cases, I'm explicitly publishing at the end and also the right Html with index.html are produced properly (I can find them in the artifacts)
Expecting the same index.html to be linked on the Code Coverage tab. What am I missing? Because it works as expected without using CoveragePublisher (this repo's diff coverage)

image

Possible reason: I'm guessing somewhere call to https://github.com/microsoft/azure-pipelines-coveragepublisher/blob/master/src/CoveragePublisher/Publishers/DefaultPublisher/HtmlReportPublisher.cs is overriding the behavior.

How can I make the Code Coverage pick the index.html from the Code Coverage_Report folder?

Expected

  1. Desire to get the ReporterGenerator report (as per the first screenshot) after enabling codeocveragepublsher's diff coverage comment on.

  2. Also a query:
    In general, how doe the "Code Coverage" tab work? which file and which path it tries to look at? And what settings can change it's behaviour?

PS. With Visuals I mean, the highlights on actual code with what's not covered or covered. Example below are the screenshots I get on clicking on any of the classname in the first desired report.
image
image

@MTomBosch
Copy link

Out of interest. How did you get the CodeCoverage tab filled with your html report files without using the "PublishCodeCoverageResults" task? Or where you using v1 of the task for your example at the top and then v2 for your example below?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants