lundi 27 juillet 2015

Test coverage with maven sonar

I have more of a theoretical question. We have a project with complicated module hierarchy. The goal is to measure unit test coverage and in the future also integration test coverage.

In order to properly place the testing dependancies, plugins and configurations in the different project poms, I need to understand the interplay between the following plugins:

  • failsafe
  • surefire
  • jacoco

What I know is, failsafe generates integration test reports, surefire generates the unit tests reports and jacoco can use both to generate the test coverage report.

What I need to know is:

  • How jacoco interacts with both failsafe and surefire?
  • Do jacoco need failsafe and surefire?
  • Can you explain the jacoco configuration and particularly why does the problem with the argLine occur?

I found a lot of examples scattered, and got the jacoco plugin working, but my goal is to place all configs etc. where they are actually needed, so that they do not pollute the maven dependency-hierarchy.

Aucun commentaire:

Enregistrer un commentaire