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
mikecaimikecai 

Are managed packages retested when deploying custom code to a Production org ?

Hello there!

 

Ok....this has to be a simple answer...but I've been surfing these forums and I haven't found it yet!

 

Basically, we have a managed package that we purchased from a vendor.  We also have custom code (triggers and classes) that we've developed.  When I use Run All Tests in our Developer Sandbox, it runs through ALL of the tests...including the tests written by the vendor for their managed package.

 

Now we have validation rules on our Leads and Contacts...for instance...a 2 letter Country Code is required.  The vendor tests all fail, most likely when they are trying to set up their test data by creating leads and contacts.

 

My question is, are managed packages retested when deploying custom (unmanaged) code to a Production org [and are customer created validation rules enforced when running those tests for managed packages]?

 

Thanks!
Mike ! 

A_SmithA_Smith
Yes, customer created validations apply when running managed package tests.  You'll need to check with the vendor to understand if that package will work at runtime with your validations in place.  If the managed package only tries to create a lead or contact for testing purposes, then you are likely safe.  However, if the package is actually creating a lead or contact at runtime (not for testing purposes), then the package will likely have an issue as it will never be able to create those record due to not passing your validation rules on those objects.
mikecaimikecai

Thanks for the feedback Andrew.  The managed package is working as desired, hence I do not believe that we have any issues there.

 

However, when we go to deploy our custom code to our Production org, do you think we will have to deactivate our validation rules so that the managed package's tests complete successfully, and thus do not bring down our overall code test coverage?