Deploy Your Components in Less Time (Generally Available)

You can now deploy components to production by skipping the execution of all Apex tests for components that have been validated within the last four days. With Quick Deploy, you no longer have to wait for all tests to run for your deployment to complete in production, and your deployment will likely finish in less than 30 minutes.
As part of a deployment, all Apex tests are run in production. If the production organization contains many Apex tests, the execution of all tests can be time-consuming and can delay your deployment. To reduce deployment time to production, you can perform a quick deployment by skipping the execution of all tests. Quick deployments are available for change sets and Metadata API components when the following requirements are met.
  • The components have been validated successfully for the target environment within the last four days (96 hours).
  • As part of the validation, all Apex tests in the target organization have passed.
  • The overall code coverage in the organization is at least 75%, and Apex triggers have some coverage.

A validation is a deployment that’s used only to check the results of deploying components and doesn’t save any components in the organization. A validation enables you to view the success or failure messages that you would receive with an actual deployment. You can validate change sets or metadata components through the API or the Force.com Migration Tool.

To learn how to validate a change set, see Validating a Change Set in the Salesforce Help.

To validate components with the Force.com Migration Tool, set the checkOnly option to true in the deploy target. See Deploying Changes to a Salesforce Organization in the Force.com Migration Tool Guide.

Performing a Quick Deployment through the User Interface or the API

To perform a quick deployment, first run a validation-only deployment with Apex test execution on the set of components that you need to deploy. If your validation succeeds and qualifies for a quick deployment, you can start a quick deployment.

You can quick-deploy validated change sets and Metadata API components in the user interface. In the Deployment Status page, deploy a recent validation by clicking Quick Deploy next to your validation or on the validation’s detail page. This button appears only for qualifying validations.

Quick Deploy button for a succeeded validation

Alternatively, you can start a quick deployment through the Metadata API by calling deployRecentValidation() and passing it the validation ID. Use this API call to deploy Metadata API components. This call doesn’t apply to change sets.

Note

Note

Quick Deploy is enabled for recent validations in which all Apex tests have executed successfully and code coverage requirements have been met. Note the following.

  • Because Apex tests are required to run in production, quick deployments are supported in production for validations that meet the criteria. You can deploy recent validations of change sets and Metadata API components (including components validated by using the Force.com Migration Tool).
  • When deploying to non-production environments (sandbox), Apex tests aren’t required and aren’t run automatically. When you’re using Metadata API (including the Force.com Migration Tool), Quick Deploy is supported in sandbox only for validations that explicitly enable the execution of tests (for example, via the runAllTests parameter for the Migration Tool). For change sets, Quick Deploy is not supported in sandbox because there is no option to enable test runs for change sets in sandbox.
  • If you perform a deployment after a validation, whether through Quick Deploy or a regular deployment, all validations no longer qualify for quick deployment. Revalidate the set of components that you need to quick-deploy.