Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 43,161
    • Issues 43,161
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,375
    • Merge requests 1,375
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #215104
Closed
Open
Created Apr 21, 2020 by James Heimbuck@jheimbuck_gl❗Developer

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.

Intended users

  • Delaney (Development Team Lead)

Further details

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.

Proposal

  • 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

example:

Date Project Name Job Name Coverage
2020-04-21 myProject myJobRspec 89.05%
2020-04-21 myProject myJobKarma 34.05%
2020-04-21 myOtherProject myOtherJobRspec 89.05%
2020-04-21 myOtherProject myOtherJobKarma 34.05%
2020-04-20 myProject myJobRspec 85.55%
2020-04-20 myProject myJobKarma 30.05%
2020-04-20 myOtherProject myOtherJobRspec 89.05%
2020-04-20 myOtherProject myOtherJobKarma 34.05%
2020-04-19 myProject myJobRspec 81.75%
2020-04-19 myProject myJobKarma 30.01%
2020-04-19 myOtherProject myOtherJobRspec 89.05%
2020-04-19 myOtherProject myOtherJobKarma 34.05%

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.

Frontend Proposal

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 ee/app/helpers/ee/analytics/navbar_helper.rb and ee/app/helpers/ee/groups_helper.rb files.

To download the CSV, we'll use the endpoint created in this backend MR - specifically the index endpoint in the app/controllers/projects/ci/daily_build_group_report_results_controller.rb file.

Permissions and Security

Any user should be able to get to this page / download the data.

Documentation

  • Create documentation for this feature.

Availability & Testing

Testing needed:

  • Appropriate level of unit/integration tests for new functionality
  • Created new E2E test requirement for this feature
    • gitlab-org/quality/testcases#932
  • package-and-qa not required for this feature unless E2E test is ready first (possible)

Risks:

  • 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

Links / references

Edited Jul 16, 2020 by Ricky Wiens
Assignee
Assign to
Time tracking