SonarQube is not displaying reports configured with the property 'sonar.testExecutionReportPaths'

215 views
Skip to first unread message

Venkata Nandagiri

unread,
Mar 7, 2018, 10:46:19 AM3/7/18
to SonarQube
I have generated JS Junit report information to an xml file, which looks like below:

<testExecutions version="1">
  <file path="C:\Program Files (x86)\Jenkins\workspace\Venkata-test-master\MyProject\App\JSUnitTests\Tests\identity\Utilities\persistDBstate.test.js">
    <testCase name="getInitialDBState returns intialstate for if session storage have the persisted DB state" duration="5"/>
    <testCase name="getInitialDBState returns empty object if session storage doesnot have the persisted DB state" duration="2"/>    
  </file>
</testExecutions>


But the report is not imported into SonarQube with the following error message 

WARN: Property 'sonar.genericcoverage.unitTestReportPaths' is deprecated. Please use 'sonar.testExecutionReportPaths' instead.
INFO: Parsing C:\Program Files (x86)\Jenkins\workspace\Venkata-test-master\JS_JUnit_Report\utut_report.xml
INFO: Imported test execution data for 0 files
INFO: Test execution data ignored for 36 unknown files, including:
C:\Program Files (x86)\Jenkins\workspace\Venkata-test-master\MyProject\App\JSUnitTests\Tests\identity\Utilities\persistDBstate.test.js

The following is my project structure:

MyProject
    -App
       - JSUnitTest
               - Tests
                    - identity
                    - employee
                    - customer
       - src



Even, I had specified -Dsonar.tests='./MyProject/App/JSUnitTests/Tests/'. But there is no use. I have been trying with different options, but nothing worked. 

Please let me know, is there any property I have to use?

Elena Vilchik

unread,
Mar 8, 2018, 5:10:44 AM3/8/18
to SonarQube
Hi,

Can it be issue with slashes in sonar.tests?
P.S. It's not critical but you are using deprecated property:
WARN: Property 'sonar.genericcoverage.unitTestReportPaths' is deprecated. Please use 'sonar.testExecutionReportPaths' instead.
Reply all
Reply to author
Forward
0 new messages