0

If we have an appexchnage package installed. When we move custom code (not related to the package) using changeset, Salesforce will run all test cases. Does salesforce also run test cases for appexchange package when deploying custom code changeset ? Any appexchange test case failure has the potential to stop the deployment of custom code ?

Any insight on this would be very helpful.

4

1 Answer 1

1

Managed package code is not included in the required code coverage calculation for deployment. The 75% requirement is on all Apex code in your org's namespace. Managed code has its own namespace, so it is not included. When deploying to production, all tests in your org's namespace will be run. Managed tests will not be run by default.
If the deployment package explicitly marks runAllTests to true, managed tests will also run. These will need to execute without any failures should the flag be set. Despite this, the 75% requirement for code coverage is still only on unmanaged code. Unit test failure results in deployment rollback.

The code coverage value computed by "Calculate your organization's code coverage" may differ from the code coverage value computed after running all unit tests using "Run All Tests". This is because "Calculate your organization's code coverage" excludes classes that are part of installed managed packages while Run All Tests doesn't.

If runAllTests flag is set to false in Production, then managed package tests will not run but every other test will run. If runAllTests flag is set to false in Sandbox, no tests will run.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .