Enable gitlab test coverage visualization with xml coverage report.
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
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:
The full report button can be clicked to give a more detailed view
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
-
I have read the contribution guidelines. -
Unit tests have been added for any new or changed code, and the test suite passes. Note: Your request will likely not be merged without the appropriate tests. -
New features and API Changes are described in doc/releasenotes.rst
. -
"closes #XXXX" is in the body of the MR description to link the related issue, if applicable.