Converter for generic test format

Hi All,

I am trying to push unit test report to sonarqube but it seems the test report xml isnt supported by sonar. I am using Sonarqube version 7.7 . It seems like i need to convert my TEST report to the format supported as mentioned in the below link

Do you have any converter to meet my requirement. Any help would be highly apreciated

Rahul Khandelwal

Hi. What do you mean by…

Which test report? What is your testing library? What is the programming language?

The programming language is Swift. the Test-report.xml which is getting generated is of the below format

<?xml version='1.0' encoding='UTF-8'?>

but my sonarqube analysis fails with the below error
ERROR: Caused by: Unknown XML node, expected “testExecutions” but got “testsuites” at line 2

seems like i need to convert my test-report.xml file to the below format. is that possible

<?xml version="1.0" encoding="UTF-8"?>
<testExecutions version="1">
  <file path="<long path>/__tests__/api.test.js">
    <testCase name="Feature when called with proper params then does somthing" duration="5"/>
    <testCase name="Feature when called with wrong paramg then does nothing" duration="1"/>


It sounds like your parameter configurations are messed up. The file snipped you’re showing doesn’t contain “testSuites”.