I have three class A,B and C with test code coverages are 60%,90% and 75% respectively. When I want to deploy these three classes together, How many classes will be deployed? Hi friends this interview question, please help me?
Its depend on total number of line in all 3 classes. Its doesnt means that if one class have 100% code coverage then that class will deploy in production. Over all code coverage should be more then 75%.
If you have over all code coverage is more then 75% and one class have 60% code coverage then also that class will deploy in production.
I think the three classes should be deployed to production if the org average code coverage is above 75%, If the org avg code coverage is less than 75% that time the three classes not deployed to production.
I think B & C should get deployed because we need a minimum 75% code coverage to deploy the classes in Production.
Thanks.
Raj
(Sweet Potato Tec)
Its depend on total number of line in all 3 classes. Its doesnt means that if one class have 100% code coverage then that class will deploy in production. Over all code coverage should be more then 75%.
If you have over all code coverage is more then 75% and one class have 60% code coverage then also that class will deploy in production.
Please check below post how salesforce is calcuating the overall code coverage.
1) https://developer.salesforce.com/blogs/developer-relations/2012/11/how-code-coverage-works.html
2) http://help.salesforce.com/HTViewSolution?id=000199478
Please let us know if this will help you
I think the three classes should be deployed to production if the org average code coverage is above 75%, If the org avg code coverage is less than 75% that time the three classes not deployed to production.
Thanks,
Vijay