You need to sign in to do that
Don't have an account?
Ivan Liu (CCE)
How to deploy code change if code coverage is lower than 75% on production site?
Previously I have written some code on a trial site. Unfortunately, the site became production before I had a chance to complete the test code. Now I continue to develop the code on a sandbox but it can't be deployed back to the production site since it keeps saying the code coverage on the production site is lower than 75%. How can I get this fixed and deploy the code?
Unfortunatly salesforce doesnt allow you to deploy your code if code coverage is lee than 75%. You must write test method to ensure coverage is atleast 75%.
Thanks,
N.J
My new code on the sandbox is well covered by tests, over 80%. But the problem is that I have some old code on the production site too with little test coverage. What I want to do is to replace the old code with the new from Sandbox. But the production site prohibits the deployment from the sandbox, saying that my old code has insufficient code coverage. Or I can add test code manually to the production site, but it doesn't show me any "New" or "Edit" links.
I'd back up your code somewhere else. Refresh your sandbox with your production instance then work on getting the 75%+ coverage in the sandbox. If you do this then you should be able to deploy it in your production instance.
Chris
I've done the way as you said. I still got the same message that stopped me from deploying for the reason of insufficient coverage. Currently, my production instance has a coverage of 6% but the sandbox has 82%. Yet, the sandbox code still can't be deployed in the production instance.
Ivan
Thanks,
N.J