Skip to content

Add C#/.NET Core Cobertura report parsing to Test Visualization Feature

Problem to solve

As a developer, I want code coverage reports generated by Coverlet to be parsed by the Test Coverage Visualization, so I can see coverage data in MR diffs and avoid bugs.

The Test Coverage Visualization feature in 12.9 seems to not support Cobertura formatted code coverage generated by a prominent .NET Core coverage tool, Coverlet.

Intended users

User experience goal

The user should be able to use the existing feature within a .net core project to see how new / modified lines of code are covered by the unit tests.

Proposal

My guess is it's either an issue with coverlet or the Gitlab cobertura parser. Since coverlet is working with our Jenkins plugins, I'd like to see if this can be fixed on the Gitlab side. There is an open issue to address this in the coverlet project but we can be more proactive about a fix so the growing .net core user base can use this feature.

Further details

Steps to reproduce

  1. Use Gitlab 12.9 with Feature.enable(:coverage_report_view)
  2. Clone the sample repository: git clone https://gitlab.com/mclayton7/dotnet-example.git
  3. Create a new branch
  4. Add a method to ExampleLib/Calculator.cs
  5. Commit the change
  6. Make a merge request.

Example Project

https://gitlab.com/mclayton7/dotnet-example/

What is the current behavior?

No line coverage is displayed on the changes page of the merge request.

What is the expected behavior?

Line coverage from the cobertura report should be shown on the changes page of the merge request.

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

Edited by 🤖 GitLab Bot 🤖