I am using DotCover with the following XML, I use this on every test assembly in my solution, generated via powershell for each test assembly. Here is an example XML config file - every assembly has "Test" at the end, and every function uses the word test.
Still, DotCover is reporting test coverage for the tests. The reporting HTML document shows test coverage at circa 100% in the test projects. Can anyone help?
Note: I have also tried attribute filters
Thanks
<?xml version="1.0" encoding="utf-8"?>
<CoverageParams>
<Executable>C:\dev\eCI\packages\xunit.runner.console.2.0.0\tools\xunit.console.exe</Executable>
<Arguments>C:\dev\eCI\Tests\Hierarchy.Tests\bin\Debug\Hierarchy.Tests.dll</Arguments>
<WorkingDir>C:\dev\eCI\Tests\Hierarchy.Tests\bin\Debug</WorkingDir>
<Output>C:\dev\eCI\SonarQubeTemp\Hierarchy.Tests.dcvr</Output>
<Filters>
<IncludeFilters>
<FilterEntry>
<ModuleMask>CompanyName*</ModuleMask>
<ClassMask>*</ClassMask>
<FunctionMask>*</FunctionMask>
</FilterEntry>
</IncludeFilters>
</Filters>
<ExcludeFilters>
<FilterEntry>
<ModuleMask>*Test*</ModuleMask>
<ClassMask>*</ClassMask>
<FunctionMask>*</FunctionMask>
</FilterEntry>
<FilterEntry>
<ModuleMask>*</ModuleMask>
<ClassMask>*Test*</ClassMask>
<FunctionMask>*</FunctionMask>
</FilterEntry>
</ExcludeFilters>
I fixed this issue by removing the filters from the config file and instead adding them as arguments in the .exe /Filters=+:module=;class=;function=;-:module=.Test*; –