A Salesforce deployment dry run runs your entire package through validation, including Apex tests and metadata dependency checks, without committing a single change to the target org. It is the single cheapest insurance policy in your release process, and most teams still skip it on "small" deployments. That habit is how a two-component field update turns into a Saturday incident call.

The mechanism behind a dry run is the checkOnly flag on a Metadata API deploy call. Salesforce compiles your components, runs the required test classes against them, and reports every failure it finds, then throws the whole thing away. Nothing lands in the org. You get a deploy ID, a pass or fail status, and a log that tells you exactly what would have broken if you had deployed for real.

What Actually Happens During a Salesforce Deployment Dry Run

When you submit a validation-only deploy, Salesforce treats it almost identically to a live one. It resolves the manifest, checks field-level dependencies, validates that referenced objects and record types exist, and compiles every Apex class and trigger in the package. The only step it skips is the final commit to the org's live metadata store.

That distinction matters more than people assume. A dry run is not a syntax check. It runs the same test suite your real deployment would require, against the same code paths, in the same sandbox or production target. If your validation rules reference a custom field that does not exist yet in the target org, the dry run fails exactly where a live deploy would have failed.

Salesforce also caches a successful validation result for ten days. Once you have a passing dry run with a specific deploy ID, you can trigger the actual deployment using that cached validation instead of running tests again. For orgs with long test suites, that single feature can cut deployment time from twenty minutes to under two.

Why Admins Skip the Dry Run and Pay for It Later

Most teams run dry runs for big releases and skip them for small ones. A single permission set tweak, a new picklist value, one updated flow. The logic feels sound: small change, small risk. But small changes are exactly where dependency chains hide.

I have watched a one-field update to an Opportunity record type fail in production because a validation rule on a connected object referenced that field by a stale API name. Nobody caught it in the sandbox because the sandbox still had the old field alias cached. A thirty-second dry run against the real production target would have surfaced that mismatch before a single sales rep saw a broken save button.

The other reason teams skip dry runs is speed pressure. Someone needs this live by end of day, and validation feels like an extra step. That math only works until the first failed deployment costs you an hour of rollback and an awkward conversation with the VP of Sales about why the pipeline view is broken.

How Dry Runs Resolve Metadata Dependencies Before Go-Live

Every Salesforce deployment is really a dependency graph. A flow references a field. The field belongs to a record type. The record type is tied to a page layout. A validation rule checks a formula field that pulls from a related object. Deploy any one piece out of order, or without the pieces it depends on, and the whole package fails.

A dry run forces that graph to resolve against the real target org, not your local assumptions about what is already there. This catches three recurring failure patterns:

None of these show up in a code review. They only show up when the deployment engine actually tries to wire the components together inside the target org's metadata store. That is the whole value of running validation first: you find out where the graph breaks before you are the one standing in the gap.

Reading Dry Run Results Without Missing the Real Signal

A dry run gives you a deploy status, a component success/failure breakdown, and a test execution summary. The status is where most people stop looking, and it is also where they miss the most useful information.

A dry run can report "Succeeded" at the top level while still carrying warnings about deprecated API calls, unused test methods, or components that passed validation but will behave differently once real data is present. Treat a green status as a floor, not a ceiling. Always open the component-level detail and scan for anything flagged as a warning, even if it did not block the deploy.

Test failures deserve particular attention because they are the most common reason dry runs fail on otherwise correct packages. A test that depends on org-specific data, like a hardcoded record ID or a user that only exists in sandbox, will fail in validation against production even though the code itself is fine. That is not a false positive. It is the dry run doing its job and telling you your test suite has a dependency problem, not your deployment.

Where Dry Runs Still Miss Things

Dry runs are strong at catching structural and compile-time problems. They are weaker at catching anything that depends on runtime data or user behavior. A validation rule that technically deploys fine can still block real records the moment a user hits save, if the rule's logic conflicts with how your sales team actually enters data.

Sharing rule recalculations, record-level automation that fires on insert, and anything gated by feature flags in Custom Metadata Types will not fully reveal their behavior during a check-only deploy. The metadata validates. The behavior still needs a smoke test after the real deployment lands.

This is the gap we built DeployEzee to close. Our platform runs the standard Metadata API dry run automatically ahead of every deployment, then layers a dependency map on top of it so you can see which components are connected before you even queue the validation. You are not just getting a pass/fail from Salesforce. You are seeing which downstream components would be affected if a dependency fails, before the clock starts on your deployment window.

Building Dry Runs Into a Real Deployment Pipeline

The teams that get the most value from dry runs are the ones who stop treating validation as optional and start treating it as a pipeline gate. Every package, regardless of size, runs check-only against the actual target org before anyone is allowed to trigger the live deploy.

In practice that means wiring the dry run into your CI step, not into a manual checklist someone forgets under deadline pressure. A failed validation should block the merge, the same way a failed unit test blocks a pull request in any other engineering workflow. Salesforce admins who came up through declarative tools sometimes resist this framing, but a blocked deploy on Tuesday afternoon beats a rollback on Friday night every time.

The ten-day validation cache is worth building your release calendar around too. If your sprint cadence is predictable, run the dry run early in the week, let the team review results, fix anything that failed, and then trigger the cached deployment closer to your release window. You get the full test coverage without repeating a twenty-minute test run twice in the same day.

DeployEzee wraps this entire sequence, dependency resolution, check-only validation, cached deploy trigger, into a single workflow so your team is not stitching together Metadata API calls by hand. One click runs the dry run. A second click, once it passes, pushes the real thing using the cached result. That is the difference between validation as a chore and validation as the default.

Frequently Asked Questions

What is a Salesforce deployment dry run?

A deployment dry run, also called a check-only or validation-only deploy, runs your full metadata package and Apex test suite against a target org without committing any changes. Salesforce reports back whether the deployment would succeed, including any test failures or dependency errors, but nothing actually lands in the org. It uses the same checkOnly flag available through the Metadata API.

How long does a validation result stay valid in Salesforce?

A successful check-only deployment is cached for ten days. During that window you can trigger the real deployment using the cached validation's deploy ID instead of rerunning the full test suite, which significantly speeds up the actual go-live step.

Can a dry run pass and the real deployment still fail?

Yes, though it is rare. This usually happens when the target org changes between the validation and the live deploy, for example if someone else deploys conflicting metadata in that window. It is one reason to keep the gap between dry run and live deploy as short as practical.

Does a dry run check Apex test coverage requirements?

Yes. A check-only deploy runs the same required test classes a live deployment would run and enforces the same coverage thresholds, including the org-wide 75 percent minimum for production deploys. If your tests fail or coverage falls short, the dry run fails exactly as a live deployment would.

Is a dry run enough to guarantee a safe production deployment?

No. A dry run catches structural and compile-time issues like missing dependencies and failing tests, but it cannot fully reveal runtime behavior such as how a validation rule interacts with real user data or how sharing recalculations perform at scale. Treat it as a strong first gate, then follow the real deployment with a targeted smoke test.