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
rmranjith8881.3927046400771116E12rmranjith8881.3927046400771116E12 

Test Coverage for Managed Package?

Hi All,

In my Sandbox(EE) we have 2 Triggers(Written by us), for that Triggers I covered the Code upto 92%.

Eventhough Code coverage is 92%, when i am moving from sanbox to Production by changesets, it showing the Error in Production as Test code Coverage failed and It showing the Code coverage 63% only.

Because of Managed Packages?

We need to cover the code for Managed Package also?

Please Let me know?


Thanks in Advance................
Best Answer chosen by rmranjith8881.3927046400771116E12
rmranjith8881.3927046400771116E12rmranjith8881.3927046400771116E12
Thank God!!!

I Found the Solution for this.

When I am deploying to Production, one more Class is there in Production,which is not required, thats why it showed 63%.

So, I deleted that class in Production, then I Successfully deployed into Production.

Thank you Prateek for your Answer.
 

All Answers

PratikPratik (Salesforce Developers) 
Hi,

Test coverage issue is not because of Managed package. for managed package you don't need to write any test classes to get test coverage.

In you Sandbox & in Production, there might be different metadata so test coverage is different for both.

You can refer to these post:

https://success.salesforce.com/answers?id=90630000000hHVZAA2

https://developer.salesforce.com/forums/ForumsMain?id=906F00000009E5XIAU

Thanks,
Pratik

P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
rmranjith8881.3927046400771116E12rmranjith8881.3927046400771116E12
Thank God!!!

I Found the Solution for this.

When I am deploying to Production, one more Class is there in Production,which is not required, thats why it showed 63%.

So, I deleted that class in Production, then I Successfully deployed into Production.

Thank you Prateek for your Answer.
 
This was selected as the best answer
PratikPratik (Salesforce Developers) 
Hi,

Many users face this issue the reson being as undelined lines above.
Glad it helped!

Thanks,
Pratik