Add project count and coverage count to tooltip
What does this MR do and why?
For #263723 (closed)
On the Average test coverage last 30 days
graph on the group repositories analytics page, this MR adds the number of projects (projectCount
) and the number of coverage jobs (coverageCount
) used to calculate the average coverage percentage (averageCoverage
, the value that we're graphing over time) to the tooltip displayed when you hover over the graph.
Why? To make it easier to determine the cause of drops and spikes in the graph by comparing how many projects/jobs contributed to the average on certain days
Screenshots or screen recordings
before | after |
---|---|
Screen_Recording_2021-11-01_at_14.22.35 | Screen_Recording_2021-11-01_at_14.12.36 |
How to set up and validate locally
- have a GitLab Premium or higher license
git checkout 263723-add-stats-to-group-coverage-tooltip
- find or create a group that contains projects that generate test coverage results
You can add this to a project's .gitlab-ci.yml
to get a pipeline with any coverage value you'd like:
stages:
- test
test:
stage: test
script:
- echo COVERAGE 80%
coverage: '/COVERAGE ([0-9]+)%/'
- navigate to the group, then in the sidebar click
Analytics
->Repository
- hover over the
Average test coverage last 30 days
graph and the tooltip should show the project count and job count in addition to the average coverage value
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.