-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Publish code coverage task overrides ReportGenerator filters #10354
Comments
Disclaimer: I'm the maintainer/author of ReportGenerator I think the new behavior is not what users are expecting. @nilfdev disable.coverage.autogenerate: 'true' |
@danielpalme yes. |
@nilfdev - thank you for reporting this issue. Adding first-class support for exclusion filters is on the backlog. The suggestion that @danielpalme has made can be used as a workaround in the meantime. |
As I have struggled with this being new to Pipelines, I want to expand on @danielpalme 's suggestion. I tried passing it every which way as a parameter, but it needed to be set at the start of my Yaml file in the following block. I have it just before the steps, and am listing that for someone else who might need a nudge in the right direction. variables: steps: |
The auto-generated reports don't seem to respect the current theme set in the DevOps GUI. Is this intended? There doesn't seem to be a way to configure the theme used by the auto-generated report, so is the only way to disable autogeneration using above methods, and keep generating it manually? |
@Sharparam |
By current theme I mean the report automatically adjusting to the theme used when viewing it. But perhaps this is a limitation in iframes? |
Correct. That's not possible with iframes. |
Might be more of a general yaml question, but how can I set this variable in a template - I have a common pipeline for my library projects and it doesn't like having 'variables' in the template file. |
I looked at my code to see how I solved it, and I set the variable in each caller. A quick search found this article though that might help. Look at the section titled "Variable re-use" and see if it might work for you. :) https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops |
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
This is still an issue. Running into it now with a client. |
@ardalis you can use the following environment variable in your build:
This issue is still in our backlogs. |
I can confirm that that did let us have consistency between the HTML report and the generated cobertura.xml file. Thanks. |
we have put this issue in our backlogs. Will work on this as per the priority |
If you want to set an environment variable inside a template, you can use the following configuration:
|
Required Information
Type: bug
Enter Task Name: PublishCodeCoverageResults@1
Environment
Issue description
I am configuring azure CI pipeline. And I've added following steps:
ReportGenerator is the well know tool https://github.com/danielpalme/ReportGenerator
that exists in the Azure Devops marketplace
in the ReportGenerator I apply filters to exclude test projects from the total test coverage report and exclude extra xUnit assemblies from analysis.
In the console log I see that following filters were applied:
-assemblyfilters:-[.tests] -[.Tests] -[xunit.]* -[.Test] -[Xunit.]*
-classfilters:-[.tests] -[.Tests] -[xunit.]* -[.Test] -[Xunit.]*
-filefilters:-[.tests] -[.Tests] -[xunit.]* -[.Test] -[Xunit.]*
as you also can see, on the next step Publishing code coverage task starts and it re-generates summary report one more time without applying the assembly filtering.
it became like this after integration with reportGenerator tool
https://docs.microsoft.com/en-us/azure/devops/release-notes/2019/sprint-150-update#cobertura-code-coverage-report-updates
how to apply filtering and exclude necessary files from the report on CI, while publishing code coverage step override the filter attributes. Can you also apply settings for filtering classes and assemblies
finale report has data that I don't really need
The text was updated successfully, but these errors were encountered: