+ Start a Discussion
nrousslang1.3911778045818787E12nrousslang1.3911778045818787E12 

Why are code coverage percentages different for each system adminstrator when running all tests?

We have multiple system administrators.  All assigned to the same objects, roles, and profiles.  When each of us runs the RUN ALL TESTS for code coverage, we receive different results.  The highest is 80% overall coverage.  The lowest is 67% coverage.  Why would that be?  What needs to be changed in order for all of us to receive the same results?

NOTE:  We have test classes for all of our APEX Triggers. We are in the process of refining the classes so that the the highest overall coverage goes to at least 90%.

Thank you for any incite you can provide!

Regards,
Nancy Rousslang
Best Answer chosen by nrousslang1.3911778045818787E12
Vinita_SFDCVinita_SFDC
All the user are having same profile or some are having cloned profiles, if yes then please check if you using "Run As" in your code.

All Answers

Vinita_SFDCVinita_SFDC
Hello,

Seema code coverage is different evrytime, please have a look at thi known issue:

https://success.salesforce.com/issues_view?id=a1p30000000T1m1AAC
nrousslang1.3911778045818787E12nrousslang1.3911778045818787E12
Hi Vinita,

Thank you for your quick response.  The link that you sent is quite helpful.


When I RUN ALL TESTS in my sandbox I do consistently receive the same overall coverage amount.  When the other system administrators do the same thing, they consistently receive the same percentages everytime.  The odd thing is that none of us receive a matching overall code coverage or values that are even close.  Does the issue that you posted above cover this inconsistency as well?  I believe that it explains inconsistencies between the same user running the same tests each time.

Regards,
Nancy Rousslang
Vinita_SFDCVinita_SFDC
All the user are having same profile or some are having cloned profiles, if yes then please check if you using "Run As" in your code.
This was selected as the best answer