Exclude methods from code coverage with Cobertura

后端 未结 5 1682
情话喂你
情话喂你 2020-11-27 14:22

Is there a way to exclude code from inclusion into Cobertura coverage reports? We have some methods that should not be included in the coverage report and therefore not driv

5条回答
  •  情书的邮戳
    2020-11-27 15:05

    This has been breaking my head for some time now.

    My problem was that I had the cobertura maven plugin setup in the reporting section instead of the build section.

    The instrumentation settings, and hence the excluding of classes or packages, won't be applied if you don't set it up on build section, so watch out for this.

提交回复
热议问题