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
jackie rodwelljackie rodwell 

Your code coverage is 74%. You need at least 75% coverage to complete this deployment

Hi,

Recently tried to validate a changeset in production from sfa. Saw "Your code coverage is 74%. You need at least 75% coverage to complete this deployment". So, Is there a way where we can find the classes with lowest code-coverage in the org?  So that code coverage can be improved for those classes ?
Gireesh ArniGireesh Arni
Hi Jackie,

open the apex classes list from UI,there you can see run all test button ,if you click that button all test classes excuation will start then open the developer console window you can find the classes with lowest code - coverage at the right corner History box in the org.

Thanks,
Gireesh
Deepak GulianDeepak Gulian
Yes you need to run the test in your sandbox environment to make sure that your apex class having at least 75% coverage.
Just search in Left Quick Search Box --> Apex Test Execution ----> Select the test class and run test.
And open the developer console, where you can check out the code coverage of your apex after successful run test.
Amit Chaudhary 8Amit Chaudhary 8
Please follow some best pratice for Deployment. I hope that will help you
1) Always try to maintain the production code coverage near 80% so that you will never face this type of issue
2) Weekly or monthly always check code coverage in prod and sandbox
3) You can download the code coverage of each class with below app exchange product
https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000DXzlpEAD

Run All test is required. In developer console you can see the code coverage of each class only. But you can not download the result in XLS.

So please download the report and check which all test classess having low code coverage . Please increase the code coverage of that classes and include that classes in package an validate your change set again

Let us know if this will help you.

NOTE:- I hope you added the Test class also in you change set while deployment ?