+ Start a Discussion
Srinivas AnnamSrinivas Annam 

test classes

I hv 10 classes and 1 trigger,code coverage is 95 %.I write Test classes for 9 classes and 1 trigger,(but not write test class for 1 class) (or) I write Test classes for 10 classes,( but not write test class for trigger).
 Is it possible to deployee the code to production. 
Best Answer chosen by Srinivas Annam
Srinivas SSrinivas S
Yes, Salesforce considers overall code coverage which should be 75%.

10 Classs --> 9 class with 90%+ coverage, 10th class (no test class 0%) --> you can deploy
1 Apex Trigger --> 0%  (overall more than 75%)--> you cannot deploy because trigger needs atlease 1% code coverage eventhough you are having overall code coverage more than 75%.

Thanks,
Srinivas
- Please mark as solution if your problem is resolved.

All Answers

Srinivas SSrinivas S
Yes, Salesforce considers overall code coverage which should be 75%.

10 Classs --> 9 class with 90%+ coverage, 10th class (no test class 0%) --> you can deploy
1 Apex Trigger --> 0%  (overall more than 75%)--> you cannot deploy because trigger needs atlease 1% code coverage eventhough you are having overall code coverage more than 75%.

Thanks,
Srinivas
- Please mark as solution if your problem is resolved.
This was selected as the best answer
Srinivas AnnamSrinivas Annam
thanks...