I convert my .coverage
file to xml
(using codecoverage.exe analyze ...
) and then run ReportGenerator to convert this file to a Cobertura.xml
file.
...
Creating summary
Writing report file 'D:\a\1\s\TestResults\badge_linecoverage.svg'
Writing report file 'D:\a\1\s\TestResults\badge_linecoverage.png'
Writing report file 'D:\a\1\s\TestResults\Cobertura.xml'
Report generation took 16.8 second
Next I publish the code coverage summary file using Publish Code Coverage Results task
- task: PublishCodeCoverageResults@1
# ------------------------------------------------------
displayName: Publish code coverage
# ------------------------------------------------------
inputs:
codeCoverageTool: cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)\TestResults\cobertura.xml
I notice that this tasks generates \html\*
using ReportGenerator (Sprint 150).
When I check the Summary / Code Coverage on the Azure DevOps portal for that build I can only download the results? The task has created an artifact though..
What am I doing wrong?