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
Kim BryantKim Bryant 

Average test coverage across all Apex Classes and Triggers is 0%, at least 75% test coverage is required.

I've setup an Apex Class and VF Page in my sandbox for setting up Salesforce to work with PayPal via Form Assembly as outlined on Form Assembly's documentation page http://help.formassembly.com/knowledgebase/articles/344389-make-salesforce-and-paypal-work-together

When I try to doa  changeset from the Sandbox where this is all setup into the production I receive the error: Average test coverage across all Apex Classes and Triggers is 0%, at least 75% test coverage is required.
Best Answer chosen by Kim Bryant
NehalNehal (Salesforce Developers) 
Hi,

Yes please increase the code coverage in production. I hope this helps.

Please mark this as a "Best Answer" if this has resolved your issue.

All Answers

NehalNehal (Salesforce Developers) 
Hi,

You are getting this error in your production Org. So you need to make sure whenever you do deployments, the code coverage in your destination Org, should be atleast 75%.
If it is not, then you would have to increase the code coverage of the classes in your production Org which is less than 75%.

To check for the code coverage, you do "RunAlltest" for the classes/Triggers in developer console in your production, which will give you the number of classes with code coverage less than 75%.

I hope this helps.
Kim BryantKim Bryant
I’ve gone through the ‘RunAllTests’ however the specific class doesn’t even show up as being run in the list.
Kim BryantKim Bryant
After running tests further I can look at my Class and it says I have a 100% code coverage. yet in production I continue to get this error.
NehalNehal (Salesforce Developers) 
Hi,

Please log in to your production Org and got to Setup-> ApexClasses-> And here click on estimate code coverage link and check what is the average code coverage of your production org.
Kim BryantKim Bryant
The overal code coverage is 0 in production. Not really sure how I can increase that.
NehalNehal (Salesforce Developers) 
Hi,

Yes please increase the code coverage in production. I hope this helps.

Please mark this as a "Best Answer" if this has resolved your issue.
This was selected as the best answer