Skip to content

Enable gitlab test coverage visualization with xml coverage report.

Mads-Peter Verner Christiansen requested to merge cobertura into master

This MR introduces two changes to the pipeline that enables

  • Code coverage indication in MR's in the 'Changes' section of the MR.
  • Test summary in the main body of the MR
  • Lots of test information in the pipeline section.

I believe this makes it easier for both developers of new MR's to ensure that their updates are properly and thoroughly tested and for reviewers to check that MR's introduce tested code.

The screenshot below shows an example of the new coverage indication Screenshot_2023-11-01_at_8.19.39_PM

Here green lines in the margin indicate code with coverage, and red lines indicate lines with no coverage. You can see that this matches the html coverage. Note, that it can take a little when going to the ´Changes´-section for this to show up - and all stages must have passed or they wont show up. This is all based on the 'coverage.xml' files.

The second feature produces something like is shown in the screenshot below: Screenshot_2023-11-01_at_8.22.54_PM

The full report button can be clicked to give a more detailed view Screenshot_2023-11-01_at_8.23.13_PM

These two are based on a junit xml report - so each test job produces both of these. For some reason the two files are ever so slightly different so neither one of them can be used for both features.

Checklist

Edited by Mads-Peter Verner Christiansen

Merge request reports