Deploying Salesforce metadata to the wrong environment — or skipping required test validation — is one of the most common and costly mistakes in Salesforce development. Understanding when to deploy to a sandbox versus production, which test level to use, and what can go wrong at each stage will save you hours of rollback and debugging.
A Salesforce sandbox is an isolated copy of your production org used for development, testing, and staging. Sandboxes share the same metadata schema as production but contain separate data, allowing you to safely develop and test changes without affecting live users or real records.
Every Salesforce org comes with at least one Developer sandbox. Higher editions include additional sandbox types with more data capacity.
| Type | Refresh Interval | Storage | Best for |
|---|---|---|---|
| Developer | 1 day | 200 MB data / 200 MB files | Individual development, quick iteration |
| Developer Pro | 1 day | 1 GB data / 1 GB files | Larger dev projects, more complex data needs |
| Partial Copy | 5 days | 5 GB | UAT with a representative data sample |
| Full | 29 days | Full production copy | Pre-production staging, performance testing |
For most development workflows, a Developer or Developer Pro sandbox is sufficient. Partial Copy and Full sandboxes are valuable when user acceptance testing requires production-like data volumes.
A typical Salesforce deployment pipeline moves metadata through a series of environments before reaching production:
Not every project needs all four stages. Smaller teams often deploy directly from a developer sandbox to production after testing.
Every Salesforce metadata deployment runs Apex tests during deployment. The --test-level flag controls which tests run and when they're required.
| Test Level | What it runs | Valid for sandbox? | Valid for production? |
|---|---|---|---|
NoTestRun | No tests | Yes | No |
RunSpecifiedTests | Named test classes only | Yes | Yes, if coverage ≥ 75% |
RunLocalTests | All non-managed-package tests | Yes | Yes (default for prod) |
RunAllTestsInOrg | Every test including managed packages | Yes | Yes (slowest) |
NoTestRun for rapid iteration during early sandbox development when you're not changing Apex code.RunSpecifiedTests when you know exactly which test classes cover your changes and need faster feedback.RunLocalTests as your default for production — it's the safest and most complete option without the overhead of managed package tests.RunAllTestsInOrg only when debugging coverage issues that might involve managed package interactions.Even well-tested changes can fail in production for reasons that didn't appear in a sandbox:
sf project deploy validate. This runs the full deployment — including all tests — without actually committing any changes. If it passes, your real deploy will too.Salesforce metadata deployment covers a wide range of components: Apex classes and triggers, Lightning Web Components and Aura components, custom objects and fields, page layouts, permission sets, flows, reports, dashboards, and more. Anything that's part of your SFDX source directory gets included.
Components that exist in the org but are not in your source directory are left untouched. Deploying is additive and modifying — it does not delete components unless you explicitly include a destructive changes manifest.
The standard deployment workflow requires the Salesforce CLI installed locally, terminal access, and authenticated sessions that expire. For teams where developers need to deploy quickly without setting up local tooling, reapd provides a browser-based deployment interface.
Connect your GitHub repository and Salesforce org via OAuth, select your branch and source path, choose a test level, and start the deployment. Live logs stream in real time, and failures are broken down by component — the same information you'd see in a terminal, without opening one.
Both sandbox and production deployments are supported. Saved org connections make it easy to switch between dev, QA, and production environments without re-authenticating each time.
No local CLI. No terminal. Connect your org and GitHub repo and start deploying in seconds.
Start deploying free →