I am executing code coverage through SFDX cli, below is the command:
sfdx force:apex:test:run --targetusername $username --resultformat json --codecoverage --testlevel RunLocalTests
I then upload the report in sonarqube.
I see 2 results on console:
1) testruncoverage --> It is 28%. 2) orgwidecoverage --> It is 34%.
"testruncoverage --> It is 28%" is the one that gets posted on SonarQube.
What is the difference between those 2? How do I make testRunCoverage and orgWideCoverage as same? How do I show orgWideCoverage on sonarqube?
Should I be running it as "--testlevel RunAllTestsInOrg"