# Sandboxes, change sets and deploying code

*Platform Developer Study Guide · Testing, Debugging, and Deployment · Last updated October 15, 2026 · https://www.certifyforce.com/study-guide/platform-developer/testing-debugging-and-deployment/environments-and-deploying-code*

Pick the right sandbox by data and refresh interval, choose between change sets, the Metadata API through the CLI and packages, and meet production test levels, coverage, validation, Quick Deploy and deletion rules.

- Certification: Salesforce Platform Developer
- Exam section: Testing, Debugging, and Deployment
- Study guide: https://www.certifyforce.com/study-guide/platform-developer

**Official exam objective:**

> Describe the environments, requirements, and process for deploying code and associated configurations.

## What the exam expects

- Choose a sandbox type (Developer, Developer Pro, Partial Copy, Full) or a scratch org from what is copied, storage and refresh interval.
- Decide between change sets, the Metadata API through the Salesforce CLI, and unlocked or managed packages given which orgs are involved and whether components must be deleted.
- State what a production deployment of Apex requires: test level, 75% coverage, passing tests and trigger coverage.
- Plan a release with a validation-only deployment and Quick Deploy, and remove metadata with a destructive changes manifest.
- Explain source tracking and CI basics.

Key terms: **sandbox** (an isolated copy of production); **deployment connection** (the link change sets need); **test level** (which Apex tests a deployment runs); **Quick Deploy** (committing a validated deployment without rerunning tests); **source tracking** (the CLI's record of local versus org changes).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Refresh intervals | Developer and Developer Pro 1 day, Partial Copy 5 days, Full 29 days | [Sandbox Licenses and Storage Limits by Type](https://help.salesforce.com/s/articleView?id=sf.data_sandbox_environments.htm&type=5) |
| Performance and load testing | Only Full sandboxes support it | [Sandbox Types and Templates](https://help.salesforce.com/s/articleView?id=sf.create_test_instance.htm&type=5) |
| Change set reach | Only orgs affiliated with the same production org, over a deployment connection | [Change Sets](https://help.salesforce.com/s/articleView?id=sf.changesets.htm&type=5) |
| Change set deletions | Not possible; renames aren't either | [Change Sets Best Practices](https://help.salesforce.com/s/articleView?id=sf.changesets_best_practices.htm&type=5) |
| Production Apex rule | 75% coverage, all tests pass, every trigger has some coverage | [Testing Best Practices](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_best_practices.htm) |
| NoTestRun | Development environments only; their default | [deploy()](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy.htm) |
| RunSpecifiedTests coverage | 75% per class and trigger in the package; test classes only | [Running a Subset of Tests in a Deployment](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_run_specific_tests.htm) |
| Validation job ID | Valid for 10 days for Quick Deploy | [project deploy quick](https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_project_deploy_quick.html) |
| Delete-only deployment | destructiveChanges.xml plus an empty package.xml with the API version | [Deleting Components from an Organization](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_deleting_files.htm) |
| Source tracking in sandboxes | Developer and Developer Pro once enabled; not Partial Copy, Full or Developer Edition | [Enable Source Tracking in Sandboxes](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_setup_enable_source_tracking_sandboxes.htm) |

## Check yourself

- Why can't a Full sandbox serve as each developer's daily environment?
- When does a production deployment with no test level set run no tests?
- Why use the CLI rather than change sets between two unrelated orgs?
- Which package type suits an internal app installed and upgraded across several orgs?

## Sources

- [Sandbox Licenses and Storage Limits by Type](https://help.salesforce.com/s/articleView?id=sf.data_sandbox_environments.htm&type=5)
- [Sandbox Types and Templates](https://help.salesforce.com/s/articleView?id=sf.create_test_instance.htm&type=5)
- [Deploy Your Changes](https://help.salesforce.com/s/articleView?id=sf.deploy_overview.htm&type=5)
- [Change Sets](https://help.salesforce.com/s/articleView?id=sf.changesets.htm&type=5)
- [Change Sets Best Practices](https://help.salesforce.com/s/articleView?id=sf.changesets_best_practices.htm&type=5)
- [Permission Sets and Profile Settings in Change Sets](https://help.salesforce.com/s/articleView?id=sf.changesets_perm_sets_profiles.htm&type=5)
- [Testing Best Practices](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_best_practices.htm)
- [deploy()](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy.htm)
- [Running a Subset of Tests in a Deployment](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_run_specific_tests.htm)
- [Running Tests in a Deployment](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_running_tests.htm)
- [project deploy validate](https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_project_deploy_validate.html)
- [project deploy quick](https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_project_deploy_quick.html)
- [project deploy start](https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_project_deploy_start.html)
- [Deleting Components from an Organization](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_deleting_files.htm)
- [Build and Release Your App](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_build_and_release_your_app.htm)
- [Unlocked Packages](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_unlocked_pkg_intro.htm)
- [Second-Generation Managed Packages](https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/sfdx_dev_dev2gp.htm)
- [Track Changes Between Your Project and Org](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_source_tracking.htm)
- [Enable Source Tracking in Sandboxes](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_setup_enable_source_tracking_sandboxes.htm)
- [Scratch Orgs](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs.htm)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 13 linked practice questions, and unlimited timed mock exams are included with the Platform Developer pack (USD $19): https://www.certifyforce.com/practice-exams
