Does sonar.testExecutionReportPaths support wildcard

Must-share information (formatted with Markdown):

  • We are using SonarScanner 4.7.0.2747 in our jenkins

  • I would like to add the generic test report so we can see the number of unit tests in

  • We have tried adding this sonar.testExecutionReportPaths=app/frontend/coverage/sonar-report.xml, coverage/out/test-report*.xml to sonar-project.properties this is failing with unable to find the file coverage/out/test-report*.xml

If the wildcard don’t work with sonar-project.properties, is it possible to update sonar-project.properties dynamically.

Tried with multiple wild cards:

[2023-11-16T02:52:24.158Z] sonarqube            | ERROR: Error during SonarScanner execution

[2023-11-16T02:52:24.158Z] sonarqube            | ERROR: Error during parsing of generic test execution report '/cix/src/coverage/out/**/*.xml'. Look at the SonarQube documentation to know the expected XML format.

[2023-11-16T02:52:24.158Z] sonarqube            | ERROR: Caused by: /cix/src/coverage/out/**/*.xml (No such file or directory)

[2023-11-16T02:52:24.158Z] sonarqube            | ERROR:

[2023-11-16T02:52:24.158Z] sonarqube            | ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

Welcome :slight_smile:

the docs Test execution parameters have

The remarks for properties that support wildcards will mention this fact. If wildcards are not noted for a given property, then they are not supported for that property.

and wildcards are not mentioned here Test execution parameters

All languages
sonar.testExecutionReportPaths
Comma-delimited list of paths to execution reports in the generic test data format.

Use multiple comma-separated paths instead.

Gilbert