I have a maven project that has two sub modules, 1 with java and 1 with javascript. The sonar plugin for maven works great in picking up a lot of metrics, but it fails to find the test execution report from jest.
I have jest configured to use testResultsProcessor: "jest-sonar-reporter". I can see the XML report.
In the pom, I have:
The output of the scanner should have some lines about the processing of the report files, and if there is an issue with them. Please take a look at the output of the scanner. Let us know what you find. If you still need help, then please also include the scanner output in your response.
With sonar.testExecutionReportPaths=path/to/report.xml present, the log looks like this in my tests:
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=0ms
INFO: Sensor Generic Test Executions Report
INFO: Parsing path/to/report.xml
INFO: Imported test execution data for 0 files
INFO: Sensor Generic Test Executions Report (done) | time=8ms
INFO: Sensor JavaSecuritySensor [security]
That is, there should be some lines about “Sensor Generic Test Executions Report” in between ThymeLeaf and JavaSecuritySensor. These lines are not present when the sonar.testExecutionReportPaths setting is not present.
As a sanity check, you could try to run the mvn command with the sonar.testExecutionReportPaths setting explicitly included on the command line, like this:
(This was not necessary in my tests. It worked perfectly fine to include the property definition in the pom.xml as you did, so the situation remains strange.)