General Scenarios

In general, the RunLocalTests option is recommended to ensure there are no regressions. However, in many Salesforce orgs, running all local Apex tests can take hours, making this approach a potential bottleneck.

There isn’t a one-size-fits-all answer for the test level to enforce for each deployment, but here are some general recommendations:

  1. Test Level for INT/SIT/QA Deployments:
  2. Test Level for UAT and Production Deployments:

Edge Scenarios

In edge cases, such as Hotfix Deployments where a production deployment must be executed quickly, the primary consideration is whether the release contains Apex code changes. Keep in mind that for production deployments involving Apex code, a minimum coverage of 75% for the modified code is mandatory.

To determine if the release contains Apex code changes, refer to Inspect a Release

  1. If Apex Code Changes Are Included:
  2. If No Apex Code Changes Are Included:

Note: In some orgs, deploying flows may require Apex test coverage. If this applies, follow the same strategy as for Apex code changes (see Salesforce documentation for details).