PR analysis failed due to some of execution reports are missing, is it possible to allow ignoring the missing reports?

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    8.3
  • what are you trying to achieve
    I was adding PR analysis into CI pipeline, with sonar.testExecutionReportPaths, which is configured with multiple paths to execution reports.
    In CI pipeline for a PR, only affected test would be run (It takes a long time to run all tests), which means not all reports are generated. Then, the PR analysis would fail because some reports are missing.

I can see the error logs as below:

ERROR: Error during parsing of generic test execution report './a/ut-report.xml'. Look at the SonarQube documentation to know the expected XML format.
ERROR: Caused by: ./a/ut-report.xml (No such file or directory)
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

I am wondering whether there’s any option to ignore the missing reports to allow this pass.

  • what have you tried so far to achieve this

I solved the problem by passing -Dsonar.testExecutionReportPaths={dynamically_generated} to scan command.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.