How to exclude multiple assemblies and test assemblies in console.xml?

hi,

Trying to excluding as below, but neither tests nor the mentioned assemblies are getting excluded.
When just used *test* the tests were getting excluded.
But when added assembly space separted nothing is getting excluded - Any ideas?

<?xml version="1.0" encoding="utf-8"?>
<CoverageParams>
  <TargetExecutable>C:\Program Files (x86)\NUnit 2.6.2\bin\nunit-console.exe</TargetExecutable>
<WorkingDir>.\..\..\</WorkingDir>
<TargetArguments>/labels /trace=Verbose /framework=net-4.5 /timeout=250000 /xml=Nunit_Report.xml ABC.Test.dll XYZ.dll PQR.Tests.dll </TargetArguments>
  <Output>.\..\..\DotCover_Report.dcvr</Output>
  <InheritConsole>true</InheritConsole>

  <!-- Coverage filters -->
  <Filters>
 <IncludeFilters/>
 <ExcludeFilters>
 <FilterEntry>
 <ModuleMask>*Test* Assembly1* Assembly2* assembly3* </ModuleMask>
 </FilterEntry>
 </ExcludeFilters>
    </Filters>
</CoverageParams>

2 comments

Hello, Padma!

You can specify coverage filters in a separate FilterEntry elements. Like this:

<ExcludeFilters>

  <FilterEntry>

    <ModuleMask>*Test*</ModuleMask>

  </FilterEntry>

  <FilterEntry>

    <ModuleMask>Assembly1*</ModuleMask>

  ...
0

Thanks, Alexander. Its excluding now. There were some test assmeblies which didnt get excluded despite *Test* in the begining(Most of them got excluded). So, specified those as well then those also got excluded .  

0

Please sign in to leave a comment.