SonarQube Version: Unknow. The web UI will not provide that information.
Build-wrapper-version: 6.20.5
I am trying to get the SonarQube scanner to parse a Generic Test Data formatted file. I am getting the following error. Error during parsing of generic test execution report ‘path to file’. Look at the SonarQube documentation to know the expected XML format.
I am using the following property: sonar.testExecutionReportPaths and sonar.coverageReportPaths. The coverage reports are processed without issues.
This is the example from the help section located on the SonarQube help pages. Note: This generates the same error.
<testExecutions version="1">
<file path="testx/ClassOneTest.xoo">
<testCase name="test1" duration="5"/>
<testCase name="test2" duration="500">
<skipped message="short message">other</skipped>
</testCase>
<testCase name="test3" duration="100">
<failure message="short">stacktrace</failure>
</testCase>
<testCase name="test4" duration="500">
<error message="short">stacktrace</error>
</testCase>
</file>
</testExecutions>
This is an example from my test data.
<?xml version="1.0" encoding="UTF-8"?>
<testExecutions version="1">
<file path="SupportSystem/c-lib/Battery/src/test/cpp/BatteryMsgTest.cpp">
<testCase name="SerialMessageTestSuite" duration="0"/>
<testCase name="BatteryResetMessageTest" duration="0"/>
<testCase name="BatteryResetDecodeWarningTest" duration="0"/>
<testCase name="BatteryVersionConstructTest" duration="0"/>
<testCase name="BatteryVersionDecodeTest" duration="0"/>
<testCase name="BatteryVersionThrowChecksumTest" duration="0"/>
<testCase name="BatteryVersionThrowDecodeExceptionTest" duration="0"/>
<testCase name="BatteryVersionThrowDataByteDecodeExceptionTest" duration="0"/>
<testCase name="BatteryVersionSmallBufferTest" duration="0">
<failure message="short">stacktrace</failure>
</testCase>
</file>
</testExecutions>
I have tried the trivial case of one success. I have added and removed the <?xml version="1.0" encoding="UTF-8"?> tag. I have loaded the XML in an XML editor to check for syntax errors. I have read through several of the older posts with similar issues. This looks like it may be an ongoing problem for generic test data.
I have also tried playing with the property’s settings without resolution.