I'm trying to import generic test execution with sonar.testExecutionReportPaths
.
I'm using the xml file format provided in the doc.
I use full path to the file in the path attribute. And files exist.
I don't understand why my files are ignored. Any idea ?
sonar.testExecutionReportPaths = "C:\Program Files (x86)\Jenkins\workspace\CI\Sonarqube.xml"
sonar.test.inclusions = "**\*Test*.cs"
Here is the log from Sonar Runner:
INFO: Sensor Generic Test Executions Report
INFO: Parsing C:\Program Files (x86)\Jenkins\workspace\CI\Sonarqube.xml
WARNING: WARN: Property 'sonar.genericcoverage.unitTestReportPaths' is deprecated. Please use 'sonar.testExecutionReportPaths' instead.
INFO: Imported test execution data for 0 files
INFO: Test execution data ignored for 5 unknown files, including:
C:\Program Files (x86)\Jenkins\workspace\CI\Tests\A-Test.cs
C:\Program Files (x86)\Jenkins\workspace\CI\Tests\B-Tests.cs
C:\Program Files (x86)\Jenkins\workspace\CI\Tests\C-Tests.cs
C:\Program Files (x86)\Jenkins\workspace\CI\Tests\D-Test.cs
C:\Program Files (x86)\Jenkins\workspace\CI\Tests\E-Test.cs
INFO: Sensor Generic Test Executions Report (done) | time=265ms
Here is the a part of the Generic XMl File:
<testExecutions version="1">
<file path="C:\Program Files (x86)\Jenkins\workspace\CI\Tests\A-Test.cs">
<testCase name="My A Test" duration="1210" />
</file>
<file path="C:\Program Files (x86)\Jenkins\workspace\CI\Tests\B-Tests.cs">
<testCase name="My B Test" duration="566" />
</file>
</testExecutions>
Thank you!
A-Test.cs
in the SonarQube UI, how does the path displayed for it compare with the path in your report? – Permutefile
element does not match the file known to SonarQube. – Unwarrantable