I am using dotnet dotcover test command in my gitlab-ci.yml to get the code coverage. I have included dotcover dotnetclitool version 2020.3.3 in my unit tests solution for this command to execute during the pipeline test stage. But i am not able to successfully exclude certain classes(under a specific namespace/folder) from the code coverage results. My solution structure is as follows:
- source folder
- AClient.Repository.csproj
Extensions folder
AClientExt.cs
Models folder
ModelA.cs
ModelB.cs
Repository folder
RepoA.cs
RepoB.cs
- AClient.Repository.csproj
- tests folder
- AClient.Repository.UnitTests.csproj
- RepositoryTests
RepoATests.cs
- RepositoryTests
- AClient.Repository.UnitTests.csproj
Now the code coverage includes both the solutions and I want to exclude the following namespaces:
AClient.Repository.Extensions.*
AClient.Repository.Models.*
AClient.Repository.Tests.*
I am running this command and it is not able to exclude the filters correctly so could someone please help me figure out correct usage of dcFilters: