+ Start a Discussion

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?

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..