Code coverage report JUnit + XCPretty + AzureDevops + SonarCloud


I contact you because i don’t arrive to add my code coverage in my swift project.
In my Azure devops Step, i generate a xml for my test report with XCPretty (xCode 10)
but when i pass the report i have this error.

To set my report i use this :

And i have this error for result :

Because the key that i use can’t use the junit xml format.

So how i can give my report for swift project ?


Julien Hamon

Hi @julien404,

you are trying to import a junit formatted xml with Generic Test Data property, that cannot work.

For Swift you should use sonar.swift.coverage.reportPath to point to the path of the coverage report generated from “llvm-cov show”. This path can be either absolute or relative to the project directory.