Why is test execution data being ignored from test report?

Must-share information:

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube Version 7.1
    We use powershell script (instead of VSTS task) to run sonar scanner

  • what are you trying to achieve
    I am trying to use sonar.testExecutionReportPaths to import test report (verified that the xml is in the correct format). The xml was generated using jest-sonar-reporter (https://www.npmjs.com/package/jest-sonar-reporter). But i am getting this error -
    Caused by: Line 3 of report refers to a file which is not configured as a test file:

  • what have you tried so far to achieve this

  • Tried to explicitly ignore the test file in source file exclusions and explicitly included the test files in test file inclusion
  • Tried to rename the test folder

Please note that the coverage information is being imported (sonar.typescript.lcov.reportPaths) without any issues.

I came also on this issue, you need to test sonar.tests parameter to explicit tell which files must be seen as tests files :wink: