We are using SonarCloud (SaaS) to analyze Salesforce Apex code. As part of our CI pipeline, Apex tests are executed successfully and code coverage is generated correctly during the Salesforce test run.
However, the same Apex test coverage is not being reflected in the SonarCloud dashboard after the analysis completes. The SonarCloud analysis finishes without errors, but the reported coverage remains 0% / outdated / missing for Apex files.
How are you trying to import your coverage into the analysis? This doesn’t happen automatically, you need to explicitly pass the coverage report in using the sonar.apex.coverage.reportPath parameter.
We are using SonarCloud (SaaS) for Salesforce (Apex). Our Apex test coverage is correctly generated during CI / Salesforce test run, however the same coverage is not reflected in SonarCloud dashboard
CI system used - Gitlab
Languages of the repository : Apex Code
Coverage mismatch snips
Coverage reflected in coverage json report.
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.