How do I get Emma or Cobertura, with Maven, to report coverage on source code in other modules?

前端 未结 5 826
孤城傲影
孤城傲影 2021-02-01 08:57

I have a multi-module Maven setup with Java code.

My unit tests, in one of the modules, exercise code in multiple modules. Naturally, the modules have inter-dependenc

5条回答
  •  逝去的感伤
    2021-02-01 09:51

    I doubt if would be possible since the coverage information is obtained by cobertura/emma by instrumenting the compiled classes. While this would work for classes in the specified project, it is doubtful if these tools will instrument dependant libraries.

    A look at the maven cobertura plugin usage also does not seem to indicate any such possibility.

提交回复
热议问题