AzureDevOps and replacing built-in Coverage Report #666
-
Hi, I want to make use of the AzureInline type of HTML report and show it along side (or instead of) CodeCoverageTab in AzureDevOps. The Cobertura coverage files are being generated alongside I am partially successful. What I observe is that I cannot drill down into any of the dependent links. They all link to: "https://jakubrumpca.gallerycdn.vsassets.io/extensions/jakubrumpca/azure-pipelines-html-report/1.0.8/1611303421097/dist/*.html" Is this a problem with the HTML extension? I know it's probably wrong to only publish index.html, but I did not observe any other file being generated. This is how I configured things: - task: DotNetCoreCLI@2
displayName: 'Test solution'
inputs:
command: 'test'
projects: ${{ parameters.unitTests }}
arguments: |
--no-build --collect "XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.ExcludeByFile=**/Persistence/Migrations/**
publishTestResults: true
- task: PublishCodeCoverageResults@2
displayName: 'Publish code coverage report'
inputs:
summaryFileLocation: '$(Agent.TempDirectory)/**/coverage.cobertura.xml'
failIfCoverageEmpty: true
- script: |
mkdir $(Build.ArtifactStagingDirectory)/coveragereport
displayName: 'Prepare coverage report directory'
- task: reportgenerator@5
inputs:
reports: '$(Agent.TempDirectory)/**/coverage.cobertura.xml'
targetdir: '$(Build.ArtifactStagingDirectory)/coveragereport'
reporttypes: 'HtmlInline_AzurePipelines;Badges'
assemblyfilters: '-xunit*'
- task: PublishHtmlReport@1
displayName: 'Publish coverage results'
inputs:
reportDir: $(Build.ArtifactStagingDirectory)/coveragereport/index.html
tabName: 'Coverage Report (NEW)' Actually, the PublishHtmlReport extension is a dead end. Has anyone else had success with integration of HtmlInline into AzureDevOps pipeline run summary in any other manner? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
On a second look, it seems that |
Beta Was this translation helpful? Give feedback.
-
Maybe this helps: |
Beta Was this translation helpful? Give feedback.
Maybe this helps:
https://github.com/danielpalme/ReportGenerator/wiki/Integration#attention