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
SATHISH REDDY.SATHISH REDDY. 

Code Coverage Failure Your code coverage is 73%. You need at least 75% coverage to complete this deployment

I did run all tests in my sandbox and also tried to run them each individually - the overall avg code coverage is around 88%. However, when i try to validate my change set in prod, it is throwing an error saying "Code Coverage Failure Your code coverage is 73%. You need at least 75% coverage to complete this deployment."
None of the test classes failed. Now i'm stuck at a place where it is unable to show what's causing this error nor any directives.
I would really appreciate your help! Thanks!
ShirishaShirisha (Salesforce Developers) 
Hi Sathish,

Greetings!

It could be because of the test classes which uses seeAllDate=true which uses the test data and it may vary based on the Orgs.

So,I would suggest you to avoid using the org's data and instead you can create the test records to avoid the issues.

Also,please enable the debug logs while running the validation to check,if there is any error.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
SATHISH REDDY.SATHISH REDDY.
Hi Shirisha,

None of my test classes use seeAllData attribute. Also, the debug logs doesn't show any exceptions here. I'm not sure what needs to be done here