Skip to content

Show code coverage diff as soon as coverage report is available

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Update (Jul 24th 2025)

Pipelines that are blocked with a manual job will show the code coverage diff starting %18.3

Please see #236248 (comment 2649828205) and leave feedback

Summary

I'm experimenting with the Test Coverage Visualization feature. I successfully created test pipelines that gitlab parsed my cobertura xml documents, and highlighted lines red/green if they were hit. I then tried to integrate this into my full pipeline and the coverage visualization seemed to stop working. After playing around, I noticed that the coverage wasn't visualized if the pipeline that had a job that published the cobertura, had a stage with a job that was manual and wasn't allowed to fail.

Problem to solve

As a developer who started a pipeline, I want to be able to use the Test Coverage Visualization as soon as the job that creates the report is done, so I can start a code review earlier / without waiting for the entire pipeline (could be 45 minutes!).

This problem also impacts the code coverage badge which is written up in another issue.

Intended users

  • Sasha (Software Developer) - who reports that the data is missing after starting a new build. Quote from an internal user - "One thing I noticed is that once a new build is kicked off, the inline code coverage is no longer available, and that remains true for the whole duration of the new build (which in our case is ~45 minutes)"

User experience goal

The user should be able to see the results of the job that provided coverage (code coverage report) in an MR diff as soon as that job completes successfully without waiting for the entire pipeline to go green.

Proposal

Further details

What is the current bug behavior?

Test coverage visualization doesn't seem to work unless the pipeline is "complete"

What is the expected correct behavior?

Test coverage visualization should start working once report artifacts are published.

Relevant logs and/or screenshots

The pipeline where it doesn't work:

image

The diff on a pipeline without the blocking manual job:

image

The diff on a pipeline with a blocking manual job that didn't get manually run yet:

image

Permissions and Security

Documentation

Availability & Testing

What does success look like, and how can we measure that?

Success metrics

What is the type of buyer?

Is this a cross-stage feature?

Yes - This feature is used in the Code Review category.

Links / references

Edited by Rutvik Shah