Hi.
I use bitrise and have a SonarQube step to gather coverage for our iOS app. In xcode 15.4, we are using the llmv-cov step provided in this documentation. Unfortunately, in xcode 16.0 and xcode 16.1 it doesn’t work because it’s unable to access the instrumentalized application resulted after the tests concludes (second parameter of the command provided in the documentation).
Trying to use the script xccov-to-sonarqube-generic.sh is also not providing the full coverage report. I notice that the .xml coverage file is generated and it appears to contain some coverage, but it doesn’t include everything.
In summary:
Using llvm-cov:
working fine with xcode 15.4
not working with xcode 16.0 and 16.1
Using xccov:
partially working with xcode 16.0 and 16.1 (wont gather all the coverage but will gather some)
Can anyone help me with this?
I have opened an issue in the example repo but got no answers.
Hey Colin, thanks for the answer!
We moved our project away from slather a couple months ago, and we are, currently, using sonar in a bitrise step only. So I fear that, even if it works with slather, it would not be a suitable fix for us because we would need to configure slather inside this specific bitrise flow only to run sonar and this would increase our costs without much benefits. In this case, we would rather keep sonar running on xcode 15.4 until it’s ready to run with xcode 16.
Please let us know when sonar is ready to be used with xcode 16.
Many thanks.
Thanks for the report and the explanation about your workflow.
You explain that you were using slather before, and that now that you moved to bitrise, you don’t use it anymore. Bitrise is a CI platform, if I’m not mistaken, while slather is a coverage tool.
If you don’t use slather anymore, is it because bitrise, which is specialized in mobile CI, is providing a code coverage tool?
I’m trying to understand what generates the coverage reports that fails when converted with xccov-to-sonarqube-generic.sh.
Hey, Eric
We don’t use slather anymore because we use xcode test bitrise’s step that will provide us coverage information directly from xcode and we don’t need code coverage information for anything else since sonar is, currently, our only source of truth regarding these metrics. So we just follow the steps described in the swift-coverage example and use llvm-cov directly.
This is working up to xcode 15.4, but not with xcode 16.
My guess is that xcode 16 changed their test schemes somehow, because we didn’t have any issues until this version. It also does not work when I try to run it locally instead of in bitrise env.
xcode 16.2 provides both files and works perfectly with llvm-cov but then it has a lot of performance issues, which is why we decided not to use it and try the xccov-to-sonarqube-generic.sh script approach. however, it still doesnt work as it should.
Now I can’t tell you if this xccov-to-sonarqube-generic.sh problem started with xcode 16 because we didn’t use it in older versions, we just tried now as a workaround for this situation (and I saw there’s an issue opened in the example repo saying it also doesn’t work with older xcode versions).