75 Salesforce Deployment & DevOps Interview Questions 2026 — Change Sets, SFDX, CI/CD
Interview Questions 2026
📋 Jump to Section
🔗 Related Salesforce Interview Prep
📦 Section 1 — Change Sets
Q1–Q10 · Beginner to Intermediate · Asked in Every Salesforce Admin/Dev Interview
| Step | Action | Location |
|---|---|---|
| 1 | Create Outbound Change Set | Source Org (Sandbox) |
| 2 | Add components (Apex, LWC, Fields) | Source Org |
| 3 | Upload Change Set | Source Org |
| 4 | Receive Inbound Change Set | Target Org (Production) |
| 5 | Validate or Deploy | Target Org |
- Outbound = created in source org to send. Inbound = received in target org to deploy
- Deployment connection must be authorized from both orgs in Setup → Deployment Settings
- Always validate before deploying — runs all Apex tests without making changes
- Cannot deploy data (records), only metadata
- No rollback — failed deployments auto-rollback, but successful ones are permanent
- ❌ Cannot delete metadata components (use destructive changes XML instead)
- ❌ Cannot deploy data records — metadata only
- ❌ No version control or audit history
- ❌ Cannot be automated — fully manual process
- ❌ Cannot be used between unrelated orgs (no deployment connection)
- ❌ 10,000 file and 400MB limit per Change Set
- ❌ No rollback for successful deployments
| Action | Runs Tests? | Makes Changes? | Best For |
|---|---|---|---|
| Validate | ✅ Yes | ❌ No | Pre-deployment dry run |
| Deploy | ✅ Yes | ✅ Yes | Actual deployment |
| Quick Deploy | ❌ Cached | ✅ Yes | After successful validation |
- Production automatically connects to all its sandboxes
- Sandbox-to-sandbox connections must be manually enabled
- Cannot deploy from production to sandbox using Change Sets
- Only works between orgs in the same Salesforce environment
| Feature | Change Sets | Metadata API / SFDX |
|---|---|---|
| Interface | UI only | CLI / programmatic |
| Version Control | ❌ No | ✅ Yes (Git) |
| Delete Components | ❌ No | ✅ Yes |
| Automation / CI/CD | ❌ No | ✅ Yes |
| Unrelated Orgs | ❌ No | ✅ Yes |
| Error Type | Fix |
|---|---|
| Apex test failure | Fix test class in sandbox, re-add to Change Set |
| Missing dependency | Add missing component to Change Set |
| Profile conflict | Include Profile or configure manually |
| Code coverage below 75% | Add test methods, increase coverage |
| Aspect | Profile | Permission Set |
|---|---|---|
| Include recommended? | ⚠️ With caution | ✅ Always safe |
| Overwrites target? | ✅ Full overwrite | ✅ Additive only |
| Risk | High — can remove access | Low |
- Outbound Change Sets expire after 30 days if not deployed
- Quick Deploy window is 10 days after successful validation
- No limit on number of Change Sets you can create
- ❌ Multiple developers working on same org simultaneously
- ❌ Need to delete metadata (use destructive changes XML)
- ❌ Deploying to unrelated org (no deployment connection)
- ❌ Need automated CI/CD pipeline
- ❌ Need full audit trail and rollback history
- ❌ Deploying more than once per week (too slow manually)
🏖️ Section 2 — Sandboxes
Q11–Q20 · Beginner to Intermediate · Core Admin Knowledge
| Type | Data Storage | Data Copied | Refresh | Use Case |
|---|---|---|---|---|
| Developer | 200MB | None | 1 day | Individual dev |
| Developer Pro | 1GB | None | 1 day | Larger datasets |
| Partial Copy | 5GB | Sample (template) | 5 days | QA testing |
| Full | Same as prod | All data | 29 days | UAT / training |
- All sandbox-only customizations not in production are LOST
- User passwords reset — login at test.salesforce.com with email.sandboxname
- Integrations need reconfiguring to point to test endpoints
- Must wait minimum refresh interval before refreshing again
| Feature | Sandbox | Scratch Org |
|---|---|---|
| Lifespan | Permanent | Max 30 days |
| Source | Copied from production | Definition file (JSON) |
| Data | Can copy production data | No production data |
| Version Control | Limited | Fully source-driven |
| Best For | UAT, QA, training | Feature development, CI/CD |
| Feature | Detail |
|---|---|
| Enable | Setup → Dev Hub → Enable |
| Active Scratch Org limit | 40 (default) |
| Daily creation limit | 80 |
| Authenticate CLI | sf org login web --set-default-dev-hub |
| Setting | Emails Sent | Use Case |
|---|---|---|
| No access | None | Fully isolated |
| System email only | System only | Default sandbox setting |
| All email | All (including customers!) | Use only with test data + relay |
⚡ Section 3 — SFDX & Salesforce CLI
Q21–Q30 · Intermediate to Advanced · Must-Know for Developer Roles
| Aspect | Org-Based (Old) | Source-Driven (SFDX) |
|---|---|---|
| Source of Truth | The org itself | Git repository |
| Version Control | ❌ No | ✅ Yes |
| Team Collaboration | Manual, conflict-prone | Branch-based, clean |
| CI/CD | ❌ Limited | ✅ Full |
| Environment | Shared sandbox | Individual Scratch Orgs |
| Command | Purpose |
|---|---|
| sf org login web | Authenticate to an org |
| sf org create scratch | Create a new Scratch Org |
| sf project deploy start | Deploy metadata to org |
| sf project retrieve start | Retrieve metadata from org |
| sf apex run test | Run Apex tests |
| sf org open | Open org in browser |
| sf org list | List all authenticated orgs |
| Aspect | Metadata Format | Source Format |
|---|---|---|
| Custom Object | One large XML file | Separate files per field/layout |
| Git diff | Hard to read | Clean, granular |
| Used By | ANT, Workbench | SFDX sf CLI |
| Action | Old sfdx | New sf |
|---|---|---|
| Authenticate | sfdx force:auth:web:login | sf org login web |
| Deploy | sfdx force:source:deploy | sf project deploy start |
| Run tests | sfdx force:apex:test:run | sf apex run test |
| Create Scratch | sfdx force:org:create | sf org create scratch |
🔬 Section 4 — Scratch Orgs
Q31–Q38 · Intermediate · Key for SFDX Developer Interviews
| Limit | Value |
|---|---|
| Max lifespan | 30 days |
| Default lifespan | 7 days |
| Active orgs per Dev Hub | 40 |
| Daily creation limit | 80 |
| Data + file storage | 200MB each |
- ✅ Commit all code changes to Git feature branch
- ✅ Retrieve any declarative changes (Flows, Layouts)
- ✅ Export any important test data
- ✅ Document any manual org settings changed
| Item | In Git? | Alternative |
|---|---|---|
| Apex code | ✅ Yes | — |
| Named Credential URL | ⚠️ Template only | Environment variable |
| API keys / secrets | ❌ Never | Secrets manager |
📦 Section 5 — Salesforce Packages
Q39–Q46 · Intermediate to Advanced · ISV & Enterprise Dev Knowledge
| Feature | Unmanaged | Managed | Unlocked |
|---|---|---|---|
| Code visible? | ✅ Yes | ❌ No | ✅ Yes |
| Upgradeable? | ❌ No | ✅ Yes | ✅ Yes |
| Namespace | Optional | Required | Optional |
| Best For | Templates | AppExchange ISVs | Internal modular dev |
- ✅ Source code visible and modifiable
- ✅ Supports versioning and upgrades
- ✅ Enforces modular architecture
- ✅ Works with SFDX and CI/CD pipelines
- ✅ No namespace required
- ✅ Dependency management between packages
| Feature | 1GP | 2GP |
|---|---|---|
| Development | Org-based | Source-driven (SFDX) |
| Version Control | Limited | Full Git |
| CI/CD | Limited | ✅ Full |
| Scratch Org | ❌ No | ✅ Yes |
🔄 Section 6 — CI/CD Pipelines
Q47–Q54 · Advanced · High Value for Senior Developer Interviews
| Stage | Action | Tool |
|---|---|---|
| Code Push | Developer pushes to feature branch | Git |
| CI — Validate | Validate metadata in sandbox | SF CLI |
| CI — Test | Run all Apex tests | SF CLI |
| Code Review | Pull Request review | GitHub |
| CD — Deploy | Deploy to staging/production | SF CLI + Pipeline |
| Test Level | Runs | Speed | Best For |
|---|---|---|---|
| NoTestRun | None | Fastest | Sandbox, non-code changes |
| RunSpecifiedTests | Named classes only | Fast | CI/PR validations |
| RunLocalTests | All non-managed | Medium | Production deployment |
| RunAllTestsInOrg | Every test | Slowest | Full org validation |
| Branch | Environment | Trigger |
|---|---|---|
| feature/* | Developer Scratch Org | Manual push |
| develop | Integration Sandbox | PR merge → auto deploy |
| release/* | UAT / Full Sandbox | PR merge → auto deploy |
| main | Production | PR merge → auto deploy |
🏗️ Section 7 — DevOps Center
Q55–Q61 · Intermediate · Growing Topic in 2026 Interviews
| Feature | Change Sets | DevOps Center |
|---|---|---|
| Version Control | ❌ No | ✅ Yes (GitHub) |
| UI-based | ✅ Yes | ✅ Yes |
| Audit trail | Limited | Full |
| Work items | ❌ No | ✅ Yes |
| CLI required | ❌ No | ❌ No |
- ❌ GitHub only — no Bitbucket, GitLab, Azure DevOps
- ❌ No automated test execution built in
- ❌ No data deployment support
- ❌ Limited conflict detection
- ❌ No deployment scheduling
🛠️ Section 8 — Deployment Tools
Q62–Q67 · Beginner to Intermediate · Practical Knowledge
| Tool | Best For | CI/CD? | Cost |
|---|---|---|---|
| Change Sets | Simple deployments | ❌ | Free |
| Salesforce CLI | Developer workflows | ✅ | Free |
| Workbench | Quick metadata ops | ❌ | Free |
| Gearset | Visual comparison, backup | ✅ | Paid |
| Copado | Enterprise DevOps | ✅ | Paid |
🎯 Section 9 — Scenario-Based Questions
Q68–Q75 · Advanced · Most Unique Section — Hardest to Find Elsewhere
| Step | Action |
|---|---|
| 1 | Read the exact test failure error in deployment log |
| 2 | Reproduce failure in sandbox (run same test class) |
| 3 | Fix the Apex test or code causing the failure |
| 4 | Re-upload Change Set with fixed components |
| 5 | Validate first in production |
| 6 | Quick Deploy after successful validation |
| Stage | Action |
|---|---|
| 1 — Audit | Setup → Where Is This Used? to find all references |
| 2 — Update Flow | Remove field reference, deploy updated Flow |
| 3 — Update Apex | Remove field from Apex, deploy updated class |
| 4 — Update Report | Remove column from Report |
| 5 — Delete Field | Setup UI or destructiveChanges.xml |
| Strategy | Time Saved | How |
|---|---|---|
| Validate + Quick Deploy | 30–40 min | Validate off-hours, deploy instantly |
| RunSpecifiedTests (PR) | 35 min | Map components to related test classes |
| Test Suites | 20 min | Group by module, run relevant suite |
| Parallel test execution | 15 min | Enable in Setup → Apex Test Execution |
| Component | Rollback Method |
|---|---|
| Apex class | Deploy previous version from Git |
| Flow | Deactivate new, activate previous version |
| Configuration | Manual revert in Setup |
| With Gearset | One-click rollback from history |
| Week | Milestone |
|---|---|
| 1–2 | Set up GitHub repo, install SF CLI, convert org metadata |
| 3 | Branching strategy + developer Git training |
| 4–5 | GitHub Actions workflow (validate on PR, deploy on merge) |
| 6 | Enable Dev Hub, Scratch Orgs for new features |
| 7–8 | Full team on new workflow, deprecate Change Sets |
| Check | What to Look For |
|---|---|
| Hard-coded IDs | Any Id values typed directly in test class |
| @SeeAllData | Test relying on existing sandbox data? |
| Custom Settings | Is CI org missing required configuration? |
| Async Apex | Test.startTest()/stopTest() used correctly? |
| Order dependency | Test only passes after another specific test? |
🚀 More Free Salesforce Interview Prep
Explore all topics — Apex, LWC, SOQL, Flows, Agentforce, Data Cloud & more. 21,000+ learners this month. All completely free.
👉 Visit sfinterviewpro.comPractice with real people
Join the free Mock Interview Community — practice with peers, get honest feedback, and walk into your real interview confident.
Join the Community ↗