+ Start a Discussion
Equipo Salesforce Sura GEquipo Salesforce Sura G 

Code coverage drops at deployment in production

I'm trying to deploy a few changes to some classes  from sandbox to production and I am getting a code coverage error everytime (below 75%).
In both orgs, we have a code coverage above 81%.
I did a test, deploying only a visualforce and it failed due to the same cause(code coverage of 74%).
Then I tried deploying a change to a test class and it failed again.
Btw, I cleared all tests data, recompiled the classes and execute all the tests and I get 81%.
Please help!!!

 
ManojjenaManojjena
Hi Equipo,

I have faced the same issue ,Please check below items .

1.Is there any deactivated trigger in your production organisation .
If yes delete all inactive trigger .

To detete trigger from production org .In eclipse take a backup of apex triggers from Production org .click on the xml file of the trigger an dchage the active to inactive .then save .It will automatically delete triggers from PD .

2.If any test failure from any of installed application need to uninstall if first step will not hep full .

Let me know if it helps .

Thanks 
Manoj 
 
Equipo Salesforce Sura GEquipo Salesforce Sura G
Thanks for the reply Manoj :)
We do have some inactive triggers. I´m going to deleted them and see what happens.
ManojjenaManojjena
Hi Equipo,

Are you able to deploy to production ?