Xcode code coverage to sonarcloud for iOS process

- name: Gather code coverage
        run: |
          xcodebuild test \
          -workspace xxxx.xcworkspace \
          -scheme xxxxxxUnitTests \
          -destination 'platform=iOS Simulator,name=iPhone 13,OS=15.2' -enableCodeCoverage YES

getting results in .xcresults format so how to get the coverage data to sonarcloud using sonar.properties

Hey there.

Take a look at this thread:

Tried the same one as above in GitHub Actions but

Error during parsing of the generic coverage report '/github/workspace'. Look at SonarQube documentation to know the expected XML format.

Since /github/workspace refers to a directory, I would guess something is wrong in your configuration. Can you share your full GitHub Actions YML file?

the above issue got resolved but the sonar cloud was unable to identify the

sonar.coverageReportPaths=sonarqube-generic-coverage.xml

in sonar-project.properties.

Error during parsing of the generic coverage report ‘sonarqube-generic-coverage.xml’. Look at SonarQube documentation to know the expected XML format.

what is the procedure if we need to send the sonarqube-generic-coverage.xml in sonar cloud with sonar scanner as github actions

Hey there.

Error during parsing of the generic coverage report ‘sonarqube-generic-coverage.xml’. Look at SonarQube documentation to know the expected XML format.

You may want to run a cat sonarqube-generic-coverage.xml within GitHub actions to make sure the file matches the expected format.

And, as asked previously, if you still face issues it would be useful to share your full GitHub Actions YML file.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.