Code Coverage quality gate for Salesforce


(Dev Kamal) #1

I am using Jenkins to trigger build on GitHub pull requests for SonarQube analysis with CodeScan plugin for Salesforce.
I have setup the quality gates with Code Coverage error out if below 95%. But when any analysis runs, the code coverage is not shown for any of the apex class files.

My setup
Jenkins Parameter for sonarqube
sonar.project = Salesforce

Setup a project ‘Salesforce’ and quality gates and quality profile for the ruleset I require.

The job is giving errors based on rulesets, but I need to know the code coverage also which is not happening. What should be the correct setup?

(G Ann Campbell) #2


For Salesforce, I guess you mean Apex? If so, this should help: