Production deployments with Apex tests are slow, and the release window is short. Salesforce has a way to move the slow part out of the window: validate first, then quick deploy. This post explains what quick deploy is, the conditions Salesforce sets for it, and a workflow that uses it.
What a quick deploy is
A deployment can be run as a validation (also called a check-only deployment). Salesforce runs everything a real deployment would run, tests included, but saves nothing in the org. If the validation passes, you can later promote it with a quick deploy, which deploys the validated components without running the Apex tests again.
In the Metadata API this is deployRecentValidation(). In the Salesforce UI it is the quick deploy option on the Deployment Status page. In the Salesforce CLI, sf project deploy validate starts the validation and sf project deploy quick promotes it.
What Salesforce requires
From Salesforce's documentation of deployRecentValidation(), all of these must hold:
- The components were validated successfully for the target environment within the last 10 days.
- As part of the validation, Apex tests in the target org passed.
-
Code coverage requirements are met. If you ran all tests or all local tests, overall coverage is at least 75% and Apex triggers have some coverage. If you used
RunSpecifiedTests, each class and trigger that was deployed is covered at least 75% individually.
Salesforce also says a validation that finished with passing tests "sometimes" qualifies for a quick deploy, so treat it as something to confirm rather than assume. Trailhead's guidance adds that you should not deploy again or make major changes to the org in between.
Two consequences
- A validation without tests can't be promoted this way. A quick deploy skips tests because the validation already ran them. If you validated with no tests, there is nothing to skip.
-
The tests you chose at validation time are the tests you get. A quick deploy does not add or change tests. If you validate with
RunSpecifiedTestsand the per-class coverage rule fails, the quick deploy isn't available, and it is better to find that out during validation than during the window.
A workflow that uses it
- Validate ahead of the window, against the same target, with the test level you will rely on. Run it when the package is final.
- Check that it passed, and note its ID (the CLI prints a job ID).
- Inside the window, quick deploy that ID. The deployment skips the tests, so it is much shorter than a full run.
- If the package or the target changes before the window, validate again. A quick deploy promotes one specific validation.
The 10-day limit is the one to keep an eye on. A validation from a long weekend before a release may have expired.
One thing to check first
On 28 November 2026 we found that sf project deploy validate rejected --test-level NoTestRun in our CLI run. To check a package with no tests you can use sf project deploy start --dry-run --test-level NoTestRun instead, which performs a check-only deployment. That check ran no tests, so there is nothing to quick deploy afterwards. Some answers on Salesforce Stack Exchange also report that a CLI --dry-run is not treated as a validation by sf project deploy quick at all, so use sf project deploy validate when you plan to quick deploy. Check this against your own CLI version.
How Diffbridge handles it
In Diffbridge, a validation that ran tests offers Quick deploy within the 10-day window: Salesforce deploys the validated package without re-running tests. A validation that ran no tests offers Deploy this package instead, which deploys the same zip again. The manual page on tests has the details.
I build Diffbridge, a Salesforce deployment tool, and this post first appeared on its blog. Nothing above needs it. If you spot a mistake in the quick deploy details, tell me and I'll fix it.
Top comments (0)