function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SAURABH TRIPATHISAURABH TRIPATHI 

Code Coverage in Production

I am running all test classes (excluding components from Manage Package) and getting 72% coverage. However when i am trying to validate a code deployment from Full Sandbox through Eclipse, i am not getting any error related to code coverage governor limit (which is 75%).


Best Answer chosen by SAURABH TRIPATHI
SAURABH TRIPATHISAURABH TRIPATHI
Hello Raghu,
    As per salesforce, this is known issue. As of now salesforce cannot give exact overall code coverage. We need to make sure code coverage of individual should be more than 75%.

Regards,
Saurabh

All Answers

Raghu Reddy 14Raghu Reddy 14
Hi Saurabh,

When you run all test classes in your full sandbox it will validate only full sandbox code coverage.

And when you validate code deployment through eclipse from fullsandbox to another org it will validate code coverage of destination org and the code you trying to deploy.



/Raghu


SAURABH TRIPATHISAURABH TRIPATHI
Hello Raghu,
    Thank You for reply. Let me re-phrase my question again.

I am running all test classes in PRODUCTION (excluding components from Manage Package) and getting 72% coverage. However when i am trying to validate a code deployment from FULL SANDBOX to PRODUCTION through Eclipse, i am not getting any error related to code coverage governor limit (which is 75%).
Raghu Reddy 14Raghu Reddy 14
Saurabh,

What code you are validating  ? Does it contain new test classes ?  If yes  including the new code your PRODUCTION code coverage is greater than 75%.

/Raghu
SAURABH TRIPATHISAURABH TRIPATHI
Raghu,
    I am validating with existing test classes. Also when i run all test classes in PRODUCTION (Excluding components from Manage Packages), i can see classes from Manage Package with 0% coverage in the list.

Saurabh
SAURABH TRIPATHISAURABH TRIPATHI
Hello Raghu,
    As per salesforce, this is known issue. As of now salesforce cannot give exact overall code coverage. We need to make sure code coverage of individual should be more than 75%.

Regards,
Saurabh
This was selected as the best answer