[SalesForce] How to handle installed Managed Packages failing tests

I have several AppExchange apps installed that are failing tests. What is the recommended approach to resolving this? Are tests run when a new package is installed? Is there a way to determine what is actually failing besides the name of the method and something like "expected true, actually false"? The test results rarely show enough information to be useful.

What I'm doing atm, is checking for updates for the packages, and then writing the company with the failing test results.

Any feedback would be appreciated.

Best Answer

Managed package tests are only run in the following scenarios:

  • On package upload (only applicable to the package author)
  • If explicitly selected to run (changing the namespace on the run dialog for Setup > Develop > Apex Test Execution, dev console, specific API calls to run them, like setting runTests in the metadata API deploy call).
  • On metadata API deployments that have the runAllTests flag set to true (see the runAllTests description).

There have been situations in the past where managed tests run outside of these and all were deemed bugs and fixed. They do not ever run on change set deployments, although if there are managed triggers on objects your tests invoke those managed triggers will be run.

Related Topic