+ Start a Discussion
DeepabaliBDeepabaliB 

Error in deployment of new Apex Class and VF page from Sandbox or Eclipse to Production account

Hi,

 

I am facing a severe problem while trying to deploy one new APex class and visualforce page from Sandbox/Eclipse to Production account.

 

Test coverage is Ok at developer account. Now from these code base new APex class and VF page I need to add at production account. While trying to do so, then error coming is average test coverage is below 75%.

 

My new APex class has its test coverage and my question is that when I am trying to deploy,how test coverage is being calculated?

 

Actually I can not uninstall and reinstall package at production account because of some necessary reason.So I need to include these classes externally .Either from Eclipse or from Sandbox.

 

It will be great help from your suggestions.

 

Thanks in advance.

Navatar_DbSupNavatar_DbSup

Hi,

 

Yes, test method coverage is calculated at the time of deployment it should be minimum 75% otherwise an error will occur and 

You have to check the test method that is anything hardcode or you have used something inside the test method which don’t exist in your production org.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

 

DeepabaliBDeepabaliB

Thanks for your reply.

 

I have installed an app at production account. This has test coverage 77%. Now a new APex class,a VF page ,I want to add in that app. SO I am trying to deploy that from Eclipse IDE . This new class also has its test method written . Entire app has abouve 75 % coverage at dev account also. But this is giving an error on insufficient test coverage. 

 

Thanks.Waiting for your views.

hisrinuhisrinu

Your test code might be working fine in your sandbox and it might be failing in your production (while your deployment process). It can happen if you relay on database records, so make sure that your test class is portable enought to take it any other instance.