5

I am trying to get coverage per test feature working with Sonarqube 7.

I am using jacoco-maven-plugin and my tests are running with JUnit 5.

I successfully managed to get global Coverage on Sonarqube dashboard, but I would like to go deeper by being able to see which tests covered which lines of my classes.

I've tried with the given configuration here but without success : I get the following message in the logs 'No information about coverage per test'. I see that this can be obtained by adding a listener org.sonar.java.jacoco.JUnitListener, but it is a JUnit 4 listener, so I guess it is not working because of that.

How can I manage to make the Coverage per test feature work with JUnit 5 ?

rico
  • 1,843
  • 2
  • 24
  • 41

1 Answers1

2

I have some problem and solved change version of surefire-plugin:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.22.2</version>
</plugin>
rlresende
  • 59
  • 6