Show code coverage by file/package in a project
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
As a team lead, I want to know which files in my project have low test coverage, so that I can task my team to improve coverage where it maters.
Intended users
- Delaney (Development Team Lead) - Who wants to improve coverage in their project but not randomly.
- Sasha (Software Developer) - who is looking to improve test coverage as part of a team goal
User experience goal
The user should be able to use the UI to see what the test coverage (from a generated test report on the default branch) is by file in their repository/project.
Proposal
There are a couple possible options:
- Make a view of the file already being created and possibly used for Test Coverage Visualization at the project level.
-
Add a column to the Repository view with coverage by file.- Considered but eliminated, a new report for the repository will be easier to view and the data more actionable. - Create a new Analytics repository page for Test Coverage that shows file name and current coverage in default branch.
Further details
From a sample EM "Here’s my use case - for the main project our test coverage overall is at 68.5% tracking that over time is awesome, but what I want to do is break it down per package over time (in Go packages are roughly the same as libraries, modules, or classes in other languages). So for example, we recently had a regression in a package that has roughly 39% test coverage - I’d love to be able to keep an eye on that particular package over time as well as the overall coverage"
Goals:
- Project Maintainers do not have to setup hosting for a code coverage report on Pages or some external service.
- Team Leads can at a glance see which files have low coverage
- A team member can review the state of coverage for all files in a project they participate in and write some tests to improve the coverage.
Permissions and Security
None.
Documentation
- Document how coverage report needs to be created to be used by the feature (or reference docs for Test Code Coverage
Availability & Testing
What does success look like, and how can we measure that?
Measures of Success
- We will track page views of the report page.
What is the type of buyer?
The buyer for this is a Development Manager or Director who wants to see within the GitLab app (not another site/tool) test coverage of a project at a more fine grained detail than the project. Since this expands analytics and portfolio management of testing capabilities that fits in the GitLab Ultimate tier
Is this a cross-stage feature?
Depending on the solution validated this may a cross stage feature with devopscreate.