Does sonarqube maven plugin be configured to read failsafe reports?

Does sonarqube maven plugin be configured to read failsafe reports ?
On googling , I found this property :

<sonar.junit.itReportsPath>/Users/xxx/site-order/service/target/failsafe-reports</sonar.junit.itReportsPath>

But in the doc here , I find no reference of it.
Also , when used in my POM, and running mvn sonar:sonar -X (I have setup sonarqube to localhost:9000) , I see that sonar does not pick the reports. I am using

   <plugin>
      <groupId>org.sonarsource.scanner.maven</groupId>
      <artifactId>sonar-maven-plugin</artifactId>
      <version>3.4.0.905</version>
    </plugin> 

It is however picking up surefire reports mentioned in debug logs :

[DEBUG] 14:30:05.493 Property 'sonar.junit.reportsPath' is deprecated and will be ignored, as property 'sonar.junit.reportPaths' is also set.
[INFO] 14:30:05.493 parsing [/Users/xxx/Cdk/site-order/service/target/surefire-reports]

But I have not set up any such property in my POM. Is this property taking some default value ?

Hi,

If there were a plugin that read Failsafe reports then it’s likely you would indeed need to configure analysis to pick up the reports. However, I’m not aware of such a plugin.

You may be interested in the Generic Test Data format. If you can convert your failsafe data to that format, you should be able to (configure analysis and) import it.

 
Ann

Hi @ganncamp ,

Thnx for the reply. One question though - Upon searching I found this issue : https://jira.sonarsource.com/browse/SONAR-4101
Is it related to my need ? Even I need to read IT reports. However , reading comments on it , I am not clear what it is related to.

Hi,

It’s only tangential at best.

 
Ann

These properties are set by scanner for maven automatically, you are using bit outdated version of the scanner, latest version can be found here https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven

For failsafe reports, we currently don’t support the format natively.

failsafe uses the same format as surefire nowadays, so this configuration in your pom.xml file should be enough :

    <sonar.junit.reportPaths>
      ${project.basedir}/target/surefire-reports/,${project.basedir}/target/failsafe-reports/
    </sonar.junit.reportPaths>
1 Like