Vreddy_Ark
(Vreddy Ark)
February 22, 2022, 4:56am
1
- 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
Colin
(Colin)
February 22, 2022, 10:57am
2
Hey there.
Take a look at this thread:
Here is a quick guide on importing your Coverage or Test Data reports into SonarQube or SonarCloud. These commands were used when we implemented this feature. If you use other commands, feel free to share them as replies.
If you have trouble importing your Coverage or Test data reports, please ask for help on the corresponding SonarQube or SonarCloud category.
Rely on the “Generic Test Data”
SonarQube supports a generic coverage format , allowing you to load any coverage report as soon as you …
Vreddy_Ark
(Vreddy Ark)
February 22, 2022, 9:33pm
3
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
.
Colin
(Colin)
February 23, 2022, 8:13am
4
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?
Vreddy_Ark
(Vreddy Ark)
February 23, 2022, 11:45pm
5
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.
Vreddy_Ark
(Vreddy Ark)
February 24, 2022, 6:40am
6
what is the procedure if we need to send the sonarqube-generic-coverage.xml in sonar cloud with sonar scanner as github actions
Colin
(Colin)
February 24, 2022, 10:47am
7
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.
system
(system)
Closed
March 7, 2022, 10:07pm
8
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.