DotCover excluded code is still displayed in the report

I use Teamcity with NUnit and dotCover. In my configuration, I exclude the specific namespace and the classes contained in it from the dotCover coverage. This part works fine, but when the assembly starts, the final report still shows the excluded assembly in the report, although the excluded assembly is considered 0%. This 0% coverage is also reflected in the total coverage percentage, so the overall picture from the report does not show the correct statistics.

How can I get excluded assemblies (or classes in this case) so that they do not appear in the coverage report?

Edit: I want to clarify that I'm not looking for a way to exclude code from dotCover, since I already know how to do this. I’m looking for a way to delete an excluded code, delete it or not appear in the report created for Teamcity.

+4
source share
2 answers

I removed my test project from the creation in the dotCover report, adding the following lines to "Filters:"
- :. * Tests.dll
-: Utilities.Tests

and attribute filters
-: module = Utilities.Tests

Now I get a report without a test project / code

Regards, Deiana

+1
source

If you want to exclude, for example, TestAsseblies, this is a filter that you should use:

-:*Tests 

This excludes "HelloWorld.Tests.dll", but includes "HelloWorld.dll".

More complete help can be found at http://confluence.jetbrains.net/display/TCD65/JetBrains+dotCover

0
source

Source: https://habr.com/ru/post/1381696/


All Articles