Display data from cobertura coverage reports in the MR
Problem to solve
As a developer, I want to see a summary of how coverage changed in an MR, so I can quickly identify where to shore up tests for my change.
Teams want to see a report of code coverage of their projects but the artifact created for parsing today is only available as a downloadable artifact. Code coverage is important to understand how much of your code can be tested automatically. If the coverage is near to 100%, automated unit tests are reaching the goal, otherwise it means they may miss important portions of the applications.
Intended users
- Sasha (Software Developer) - who wants to see how coverage changed by file in the MR.
- Delaney (Development Team Lead) - who's reviewing an MR for a critical feature and reviewing coverage.
- Simone (Software Engineer in Test) - who's reviewing an MR for a critical feature and reviewing coverage.
Further details
We already support parsing code coverage values from the raw output of the job, but we can do even more. When there is a coverage value for a branch we should also provide a way to see the generated coverage report in the product.
Proposal
- Use the cobertura report already uploaded and parsed for Test Coverage Visualization.
A first iteration of this may be just to show the report as an job artifact in the MR. Iterations after that may be:
- Create a minimal view of the data for the source branch in the MR (lines covered, coverage diff for files in the commit, other)
- Create a view of how coverage changed for files within the MR
- Create a view of the entire report in GitLab
Permissions and Security
Documentation
Availability & Testing
What does success look like, and how can we measure that?
What is the type of buyer?
Is this a cross-stage feature?
Links / references
Code coverage is important to understand how much of your code can be tested automatically. If the coverage is near to 100%, automated unit tests are reaching the goal, otherwise it means they may miss important portions of the applications. We already support parsing code coverage values from the raw output of the job, but we can do even more. Detect the language and the tests that the application has, and automatically run the related tool to generate a coverage report. After that, we can run the Code Climate Test Reporter to convert reports into a common format and show it in the UI. This is the list of tools/languages supported by
Description
Proposalcc-test-reporter
: