我将.coverage
文件转换为xml
(使用codecoverage.exe analyze ...
),然后运行ReportGenerator将此文件转换为Cobertura.xml
文件。
...
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
接下来,我使用Publish Code Coverage Results task
发布代码覆盖率摘要文件。- task: PublishCodeCoverageResults@1
# ------------------------------------------------------
displayName: Publish code coverage
# ------------------------------------------------------
inputs:
codeCoverageTool: cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)\TestResults\cobertura.xml
我注意到此任务使用ReportGenerator(Sprint 150)生成\html\*
。
当我在Azure DevOps门户上查看该版本的<摘要> /代码覆盖率时,我只能下载结果吗?该任务虽然创建了工件。.
我在做什么错了?