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
Lukas van RooyenLukas van Rooyen 

Deploying code to live, but code coverage error

Hi all, So I wrote code in my sandbox but must deploy it to our live environment, so its 1 apex class, two visual force pages and a static component. But when I try to validate it keep saying it only has a 68% code coverage and I need 75%. What can I do? Thanks 
Anil JAdhav 14Anil JAdhav 14
Hi Lukas,

Create a test class for your Apex Class and try to cover code as much as possible. 
Add that Test Class to your package/Change Set and Validate it by selecting 'Run specified tests' option.

It will resolve your error.

Let me know if this helps.