Jacoco using xml report, including IT tests

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    I am using sonarQube 7.9.2
  • what are you trying to achieve
    I just upgraded from sonarQube 6.7 to 7.9.2, and i am trying to make jacoco generate a proper coverage report and passing it to sonar by this “sonar.coverage.jacoco.xmlReportPaths”
    But it seems that the jacoco.xml report is not including my IT tests, causing the sonar coverage gate to fail since the coverage was reduced dramatically.
  • what have you tried so far to achieve this
    I was not able to find proper documentation on how to make the jacoco include my IT tests, i saw many examples for jacoco that is generating the old “.exec” files, but non that is using the xml report and passing it to sonar…
    Please Help!!


Welcome to the community!

I’m not a JaCoCo expert but I think what you want to do is generate 2 separate reports, one for UT and one for IT. You can pass them comma-delimited to sonar.coverage.jacoco.xmlReportPaths (that’s why it ends with ‘s’ :smile:) and it should get you where you want to go.