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,870
  • 4
  • 30
  • 49

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,455
  • 1
  • 17
  • 33