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
lujandlujand 

Is it a good idea to check Ignore Apex Test Failures option when installing a managed package?

What will happen if I want to deploy my classes the next time after I install the package with that option checked?  Will I get the same Apex Test failures and can I ignore the Apex Test Failures again?

 

Thanks in advance.

aalbertaalbert

No, that is not recommended. Have you researched why you are getting apex test failures upon install? There are possible scenarios where apex test methods will fail due to a customization in the installation org unrelated to your managed package - and in that scenario you can "ignore" test methods. For example, the customer added a required field on a custom object that causes your test methods to fail a DML operation.

 

But if your package does not install without ignoring test failures, I highly recommend resolving those issues. 

lujandlujand

The two errors that we got.: one is related to our custom validation rule and the other one is Too many DML statements.

 

Thanks.

aalbertaalbert

Thanks for following up. Those are two examples when its important to enforce the apex test method failures (ie not ignore them). It is important to understand if it is an issue in your application that will surface for your customers or if it is a bug in the test method itself. Either way, both should be resolved in the managed package. 

lujandlujand

I understand that the issues should be resolved in the managed package.  Will contact the vendor.

 

Just my curiosity, let's say that I install it anyway with ignore test failures, and I fix our validation rule, will I get the too many dml statement error again (from the package) when I install or deploy something else the next time in our org?

 

Thanks very much for your responses.

aalbertaalbert

Ah, I got it. I thought you were on the vendor side. I don't believe that your own custom unmanaged classes/triggers will cause the managed package test methods to run again (and fail). So if you have 'ignored' the test methods on install, you should be fine moving forward with respect to your own custom apex.