0

I have a .NET solution with multiple projects, structure looks like this:

-Solution
  -ServiceProject
  -ServiceProject.SomeClientproject
  -ServiceProject.Tests
  -ServiceProject.SomeClientProject.Test

ServiceProject is my main project, it's a service which is also using the ServiceProject.SomeClientProject in order to do HTTP requests to some other service. ServiceProject.Tests is the unit tests project for ServiceProject, and ServiceProject.SomeClientProject.Test is the unit tests project for ServiceProject.SomeClientProject.Test.

When I'm generating Cobertura report with Coverlet using the following command:

dotnet test --collect:"XPlat Code Coverage"

2 xml reports are generated:

  1. Coverage analysis which its source is ServiceProject.SomeClientproject and contains only one package for ServiceProject.SomeClientproject.
  2. Coverage analysis which its source is ServiceProject and contains two packages - one for ServiceProject and another one for ServiceProject.SomeClientproject

Why in the second report I'm getting both packages? I want one report only for ServiceProject.SomeClientProject and another report only for ServiceProject.

Thanks!

idanz
  • 821
  • 1
  • 6
  • 17

0 Answers0