Get coverage data for all projects in a group to download
Problem to solve
As a development team lead, I want a single page of code coverage data for my group's projects, so I can quickly get the test coverage data Dakota is asking for and get back to work.
Dakota is using this data to show that directionally the code coverage measure is improving for the group.
Delaney needs to get the data for all projects that belong to the group they manage without implementing an API integration or doing it manually.
- At the group page: create a new Analytics -> CI/CD page.
- Add to this page a download button.
- The download button will get all coverage data for each project in the group
- The Provided CSV will includes:
- Date coverage was calculated (at most once per day, take last calculated number on a given day)
- Project Name
- Job name coverage came from (there may be multiple per project) from the default branch
- Coverage value
|Date||Project Name||Job Name||Coverage|
note: % sign in last column is optional
@jj-ramirez has provided the full design for this page attached to this issue. This issue is capturing the work for the button and new page only.
We'll need to make a new HAML file at
ee/app/views/groups/analytics/repositories_analytics/show.html.haml. In future iterations we'll want this to instantiate a Vue app, but I don't think that is necessary in this iteration. We'll just need to have a page title (
Repositories Analytics), a coverage data section, and a button to download the CSV.
We'll have to create a controller if one hasn't already been created by the backend. This controller will live at
ee/app/controllers/groups/analytics/repositories_analytics_controller.rb and have a
show route that renders the HAML
show file that we created.
We'll need to add a route to this page in the
ee/config/routes/group.rb file. This can be done by adding the line
resource :repositories_analytics, only: [:show] under the analytics section.
We also need to add the link to the group navbar under the analytics dropdown. We should be able to do this by adding the link to the
To download the CSV, we'll use the endpoint created in this backend MR - specifically the index endpoint in the
Permissions and Security
Any user should be able to get to this page / download the data.
- Create documentation for this feature.
Availability & Testing
- Appropriate level of unit/integration tests for new functionality
- Created new E2E test requirement for this feature
- package-and-qa not required for this feature unless E2E test is ready first (possible)
- Known risk of providing "average" coverage to possibly be misleading
- Should be mitigated with appropriate docs and by allowing users to download all data
What does success look like, and how can we measure that?
- See the parent epic.
What is the type of buyer?
Dakota - The Application Development Director is the buyer for this feature.
This will be built for GitLab Premium
Is this a cross-stage feature?
This iteration will not be cross-stage