+ Start a Discussion
Bhushan Singh 13Bhushan Singh 13 

If i have 10 classes 9 classes has 75 % code coverage , 1 class has no code coverage ,while deploy all the classes will be deploy or not

Hi,
If i have 10 classes  9 classes has 75 % code coverage , 1 class  has no code coverage ,while  deploy  all the classes will be deploy or not , or only 9 classes will deploy 1 class will fail.
please answer my question.
 
JeevanKumarJeevanKumar
Hi Bhushan,

you can deploy apex class with out maintaining any code coverage but that is not good way(i am guessing).

Thanks,
Sathya
JeevanKumarJeevanKumar
means you can deploy
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for same
1) https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_code_coverage_best_pract.htm
2) https://developer.salesforce.com/forums/?id=906F000000092uyIAA

Coverage is based on the total number of code lines in the organization. Adding or deleting lines of code changes the coverage percentage. For example, let's say an organization has 50 lines of code covered by test methods. If you add a trigger that has 50 lines of code not covered by tests, the code coverage percentage drops from 100% to 50%. The trigger increases the total code lines in the organization from 50 to 100, of which only 50 are covered by tests


For example, if you have 10000 lines of code in your organization, and one class is 9000 lines of code with 100% coverage, then the remaining 1000 lines of code require no coverage at all, and may be at 0% (except for the 1% trigger rule).

NOTE:- In short your overall code covarege should be 75%. 75% should be calculated with all classes.