Sonar + Jacoco + Junit 5 : No information about coverage per test
Asked Answered
G

1

6

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 ?

Gamali answered 15/7, 2018 at 12:21 Comment(1)
Hi! Could you share how you managed to get global coverage?Jigaboo
S
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>
Solander answered 2/6, 2020 at 20:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.