0

Is it possible to exclude/bypass certain classes in a cobertura coverage-check Ant task? i.e., the if certain classes have coverage lesser than the specified limit then the build should not fail.

ishan3243
  • 1,660
  • 3
  • 27
  • 48

1 Answers1

0

Yes, you can exclude certain classes by name, using fileset:

<cobertura-instrument todir="${instrumented.dir}">
  <fileset dir="${classes.dir}">
     <exclude name="**/*Test.class" />
  </fileset>
</cobertura-instrument>

See this answer.

Community
  • 1
  • 1
Lydia Ralph
  • 1,385
  • 1
  • 18
  • 31