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
Galen Spikes 1Galen Spikes 1 

Unable to deploy apex class due to low code coverage

I have created 2 new Apex classes and several VF pages to deploy to our production environment. These are needed for our Go-Live on January 22 but I am not able to deploy for further UX testing because Salesforce is complaining that our code coverage is only 59% on deployment from Sandbox. When I run the test in "Setup>Apex Text Execution" it says our Code Coverage is 79%.

I am currently doing a full run of all Apex Test classes, it's currently at 550/2758 with 39 failures. We use a managed application called PatronManager, but I'm not sure if managed packages and their unit tests are the culprit in this. Am I missing something? 
Scott Nelson SolutionistScott Nelson Solutionist
If you have already tested deploying from a developer org to a sandbox org, you could use a Fast Deployment and it should only test the new code rather than all code (which is where the average is coming from).

HTH