Improved Deployment Experience During Service Updates

If a Salesforce scheduled service update occurs while your change set deployment is running tests, test execution now resumes after the service is restored. Results of already executed tests are preserved, and those tests aren’t rerun. Because the majority of deployment time is spent executing tests, resuming tests saves you a lot of time. Previously, test execution was restarted from the beginning. Salesforce service updates include minor maintenance updates and major releases.

In the previous release, we provided this enhancement only for deployments started with the Metadata API or API-based tools, such as the Force.com Migration Tool. In this release, we’re providing the test resumption enhancement also for change sets.

Note

Note

  • Salesforce saves the results of executed tests in chunks. Therefore, a small portion of tests might not have their results saved because they weren’t part of the last saved chunk. These tests are rerun when the deployment is restarted.
  • If the deployment interruption happens before tests have started, the entire deployment restarts from the beginning.

Tip

Tip

Salesforce performs major service upgrades three times a year, and minor maintenance updates throughout the year. Long deployments that take several hours to complete are more likely to hit a service update window than shorter deployments. Even though test resumption in restarted deployments can save you time, we recommend that your deployments run as efficiently as possible to lower the chance of interrupted deployments. We recommend that you use these deployment features, which were added in the last few releases, to shorten the run time of your deployments.

Perform a Quick Deployment
Deploy a recent validation to bypass the execution of tests in your production instance. See Quick Deployments in Salesforce Help and Deploying a Recent Validation in the Force.com Migration Tool Guide.
Run a Subset of Tests
Use the RunSpecifiedTests test level to run only the tests you specify instead of all Apex tests in your org. See Running a Subset of Tests in a Deployment in the Force.com Migration Tool Guide.
To check whether your Salesforce instance is due for an upgrade, see http://trust.salesforce.com.