0

I have a solution with multiple unit tests projects.

And for code coverage i am using JetBrains dotCover

enter image description here

So the goal here is to exclude the Migrations folder

I have added a runsettings file named .runsettings in the root of the test project

<Functions>
    <Exclude>
        <Function>^GF.Infrastructure\.Migrations\..*</Function>
    </Exclude>
</Functions>

however the Migrations namespace still appears in the coverage results, and i have to manually exclude it :

You can also add new runtime filters right from the Unit Test Coverage: open the context menu for a desired node and then select Exclude and Create Runtime Coverage Filter.

like this : https://www.jetbrains.com/help/dotcover/dotCover__Setting_up_Coverage_Filters.html#runtime_coverage_filters

Thanks!

KARIM Yassine
  • 143
  • 1
  • 11

1 Answers1

2

Rider

Go to File | Settings | Build, Execution, Deployment | dotCover | Filtering and add an entry to Do not analyze code in: enter image description here

Visual Studio

Go to ReSharper | Options | dotCover | Filtering and add an entry to Do not analyze code in: enter image description here

mu88
  • 4,156
  • 1
  • 23
  • 47
  • thank you, i already know this solution, my question was about the support of the file .runsettings, apparrently only MsTests support it – KARIM Yassine Aug 26 '22 at 10:09