Skip to content

Draft: Expose coverage.xml in "rspec coverage" job

Peter Leitzen requested to merge pl-expose-coverage-xml into master

What does this MR do?

Exposing machine readable coverage reports (such as coverage.xml) could help teams to determine their code coverage.

The alternative right now, is to parse index.html (e.g. https://gitlab.com/gitlab-org/gitlab/-/jobs/855267969/artifacts/browse/coverage/) which is not ideal.

Example #284185 (closed).

Refs

See Slack discussion https://gitlab.slack.com/archives/C8HG8D9MY/p1605636472210000 (internal):

@10io Do we have the corresponding json or xml files of this coverage report: https://gitlab-org.gitlab.io/gitlab/coverage-ruby/?

@splattael Mh, I think we only generate index.html - I wasn't able to find any XML or JSON in job artifacts. E.g. https://gitlab.com/gitlab-org/gitlab/-/jobs/855267969/artifacts/browse/coverage (edited)

@splattael We are generating XML (Cobertura) but are not exposing them:

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Leitzen

Merge request reports