+ Start a Discussion
Mike LeachMike Leach 

Package Upload Wizard Fails on Test Coverage

Running all tests in Salesforce shows 91% test coverage, yet the package upload wizard says only 52% and fails to package.

 

Not a single class falls under 78%.... most are 100%.

 

What would cause this?

 

 

 

 

Thanks

 

-Mike

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Mike LeachMike Leach

Doh! Forgot to add test classes to package (not automatically pulled in as part of dependency check).

 

That resolved the issue.

All Answers

Mike LeachMike Leach

Doh! Forgot to add test classes to package (not automatically pulled in as part of dependency check).

 

That resolved the issue.

This was selected as the best answer
adam_purkissadam_purkiss

Happens to me all the time - especially with trigger test classes since they don't automatically get included in the package. So:

 

trigger UpdateContact on Contact (before update)

 

Needs to be called by a test class that updates a contact but doesn't necessarily touch custom objs/fields that would pull the class into your package automatically.