| JUnit | artifacts:reports:junit 解析用例结果 |
|---|---|
| 覆盖率 | coverage 关键字用正则从日志提取 |
| Cobertura | artifacts:reports:coverage_report 展示行覆盖 |
| 展示位置 | MR 差异视图与流水线页面 |
报告配置
报告配置
test:
script: [pytest --junitxml=report.xml]
coverage: '/TOTAL.+ (\\d+%)/'
artifacts:
reports:
junit: report.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml报告文件路径写错时不会有明显报错,只是页面无数据:配置后到 MR 验证一次。