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
Linda 98Linda 98 

URGENT-Unable to deploy to production even though code coverage is 92%


I am trying to deploy a trigger and test class to prodcution with code coverage of 100% .
My production coverage is 92% But when i validate my change set it says code coverage error-71% ..need 75%.

All my classes and triggers are almost 89-90% .

I just refreshed sandbox too to make sure both are in same settings.Stil same error.

Please help..I need this to solve ASAP!!! please.
Derek BissonDerek Bisson
How big is your test class? I had a colleague run into a similar issue earlier in the year and suqsequently ran into a bug. Apparently, if your test coverage exceeds a certain line threshold the system cannot handle it. The solution my colleague came up with was to split his test class into a few smaller classes. good luck!
Linda 98Linda 98
Irrespective of a particular test class i get the same issue.Even though i deploy a 3 lines of code i still get that error.Also my test class al are small and only use test data.
Thank you for the suggestion.
Hi, I too faced this issue.

This may due to ( seealldata = true ) used in your testclass.But for me,I have UtilClass in my org,What i did to rectify the error was,I have deleted the util class and recreated as same as before.And it works for me... Try this!