You are here:
Validate-Only Deployment
Run a validate-only deployment to find deployment errors, Apex test failures, and code coverage issues without changing the target org or merging branches. If the validation succeeds and remains eligible, complete the promotion within 10 days without rerunning Apex tests..
Required Editions
| Available in: Lightning Experience in Professional (API access required), Enterprise, Performance, Unlimited, and Developer Editions |
| Not available in: Government Cloud Plus. Contact your Salesforce account executive for more details. |
| Not available in: EU Operating Zone. EU Operating zone is a special paid offering that provides an enhanced level of data residency commitment. Lifecycle Center is supported in orgs in the EU that aren’t part of EU OZ, per standard product terms and conditions. |
How Validate-Only Deployments Work
During a validate-only deployment, Lifecycle Center performs a check-only deployment to the target org, runs the selected Apex tests, and reports whether the validation succeeded. The validation doesn’t complete the promotion.
You can view validate-only deployment results in the Activity History tab. If validation fails, review the activity details, fix the issue, and rerun the validation.
Complete the Promotion After a Successful Validation
When a validation succeeds, you can finish the promotion from that validation without rerunning Apex tests. Lifecycle Center saves the validated changes in the target org, completes the branch merge, and moves the work items to the next stage. This step is optional. After validation succeeds, you can still run a standard promotion. A standard promotion runs a new deployment and the tests selected for that promotion.
Considerations Before You Run a Validate-Only Deployment
- Allow time for validation. A validate-only deployment can take about as long as a standard deployment that runs the same Apex tests. Run validation early to investigate and fix any failures before you plan to promote.
- Select a nondefault Apex test option. A validation that uses the default test option (no tests) requires you to rerun tests before promoting. For details about the available options, see Promotion Options.
- Meet the test and code coverage requirements. The deployment checks and selected Apex tests must pass. Changes must meet the code coverage requirements. Production deployments require at least 75% Apex code coverage. If Lifecycle Center can’t determine the code coverage or coverage is below the threshold, validation fails and you can’t complete the promotion from that validation.
- Account for stage test suites. Lifecycle Center Testing test suites assigned to a pipeline stage are separate from the Apex tests selected for the deployment. Assigned test suites run automatically as a pre-promotion quality gate. A failed quality gate blocks the promotion. See Testing Before Promotion to the Next Stage.
- Complete the promotion within 10 days after a successful validation. Each successful validation has its own eligibility period.
- Keep the validated changes unchanged. The changes you promote must match the validated changes. For example, if you validate work items WI000001 and WI000002 but later select work items WI000001 and WI000003, run another validation or use a standard promotion.
- Avoid promotions and external merges before completing a promotion. A promotion or external merge that changes the source or target stage makes validation ineligible, even if the new changes appear unrelated to the validated changes.
- Lifecycle Center checks eligibility when it shows the Complete Promotion option and again when you start the deployment. The target org also rejects an expired or unusable validation.
- If you rerun validate-only deployment, Lifecycle Center considers only the last validation.
- You can run validate-only deployment without selecting any Apex tests, in which case, Lifecycle Center doesn't show the Complete Promotion option.
- Only metadata changes are validated. When you complete the promotion, data changes are deployed without validation.
If a validation is no longer eligible, run another validate-only deployment or continue with a standard promotion.
