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
shaal.shaan1.3936092950544321E12shaal.shaan1.3936092950544321E12 

why i have to maintain code coverage of 75% can anyone please explain me

why i have to maintain code coverage of 75% can anyone please explain me
Matt WhalleyMatt Whalley
It just good practice to have at least 75% of your code executed and audited with test methods.  By testing your code in test classes lowers the likehood of failures when it is in Prod.  It's also much faster for your test classes to run tests than you could, so you could think of it as automated QA.
SFDC_DevloperSFDC_Devloper
Hi Shall,

There is no hard and fast rule that every class should get above 75% test coverage. But it is a good practise to maintain atleast 75% test coverage for each class. If you are deploying all class then there will be no problem with the test coverage as the whole organization has atleast 75% test coverage. when you are trying to deploy a individual class if that class doenot has the 75% test coverage then it will be problem for deployment.

Please go throught the below URL for more details.

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_best_practices.htm

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_deploying_ant_deploy.htm

Thanks,
Rockzz
shaal.shaan1.3936092950544321E12shaal.shaan1.3936092950544321E12
thank you guys