Help save net neutrality! Learn more.

Excluded types being included

  • Derek Greer

    Derek Greer - 2009-04-08

    After running PartCover with nunit-console, I'm seeing coverage on types that I've explicitly excluded.  My command line looks something like:

    Tools/PartCover/PartCover.exe --target-work-dir . --target Tools/NUnit/nunit-console.exe --target-args Source/Commons/UnitTests/Acme.Commons.Logging.Log4Net.Tests/bin/Debug/Acme.Commons.Logging.Log4Net.Tests.dll --include [*]* --exclude [ISymWrapper*]* --exclude [nunit*]* --exclude [Moq]* --exclude [*Tests]* --exclude [log4net*]* --exclude [SpecUnit*]* --exclude [Acme.Commons.Logging.Log4Net.Tests]* --log 0
    --output coverage.xml

    And viewing my coverage.xml via PartCover.Console.exe shows the following assembliies:

    ISymWrapper (3%)
    Acme.Commons.Logging.Log4Net.Tests (100%)

    I'm not sure where the ISymWrapper is coming from, but I've tried excluding it as well as my unit test assembly, both through [*Tests]* and by specifying the name explicitly.  Am I doing something incorrectly?

    • Dan Ports

      Dan Ports - 2009-04-08

      Yeah, it looks like you are missing the equal signs between the argument names and values. Here's an example showing the correct syntax:

      tools\PartCover\PartCover.exe --target=..\tools\NUnit\nunit-console.exe --include=[*]* --target-args=..\Project.nunit --output=partcover.xml --exclude=[*Tests*]*


Log in to post a comment.