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?