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
mahesh reddy 4mahesh reddy 4 

My developer org's overall code coverage is 76%, but some classes are still 0% while others are 100%. Will I be able to deploy all my code or does Salesforce require a 75% coverage per class?

logontokartiklogontokartik
HI Mahesh,

The code coverage is "Overall Code Coverage", so you are not forced to have 75% for each class in your org as long as you have 75% across. But as a best practice I would suggest you to have code coverage for all the apex classes in your org. 
Deepak Kumar ShyoranDeepak Kumar Shyoran
The Cove coverage is calculated in Such a way that they count total line of exact code excluding any comments or blank line by combining all classes of a Organization ,Package , change Sets and then total code covered in Test class and if the ration is above 75% that means you've already break the barrier of minimum 75% code coverage.
So if you have 3 class one , second have 100 line of code and the third one have 12- 15 line and you have covered 80-90 % for both first and second so you can avoid to cover the test coverage for 3 rd class. Hope now it's clear to you.
kaustav goswamikaustav goswami
Also you need make sure that if there are triggers in your org then all the triggers have at least some code coverage. If there are triggers that have 0% code covered the deployment will fail.

Thanks,
Kaustav