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
alok29novalok29nov 

Deployment error

Hi All,

 

I am trying to deploy a class from sandbox to production. It has 100% test coverage in sandbox but When I deploy it to prodcution, I get the below error.

    Failed ( 1 )

API NameTypeLineColumnProblem
Deploy Error   Average test coverage across all Apex Classes and Triggers is 64%, at least 75% test coverage is required.
Can anyone please tell me why am I getting this error and how can I remove this error?
Thanks,
Alok
Prady01Prady01

Hello There thats because when you deploy something onto the Pro Org all the test classes will run and the average code coverage over all the apex classes will be calculated and that should be more than 75%... Hope this helps here is a link which will explain you much more in detail..

 

http://wiki.developerforce.com/page/An_Introduction_to_Apex_Code_Test_Methods