DevOps & Testing Interview Questions
Sandboxes, SFDX, packaging, CI/CD pipelines, test strategy, and release management.
Concept at a glance
Source-driven delivery moves changes from Git through automated tests and sandboxes to production.
- SFDX & source tracking
- CI/CD with automated tests
- Sandbox strategy
- Unlocked packages & rollback
Source-driven delivery moves changes from Git through automated tests and sandboxes to production.
Difficulty Level
Topic Focus
Showing 100 of 100 DevOps & Testing questions
What is source-driven development on Salesforce?
A team still builds in production and copies changes with change sets.
What is the difference between scratch orgs and sandboxes?
A team debates whether to adopt scratch orgs.
What are unlocked packages and why use them?
A large org with 3,000 Apex classes wants clearer boundaries between teams.
How do you design a CI/CD pipeline for Salesforce?
A team of 15 developers needs automated validation and deployments with GitHub.
What test levels are used in Salesforce deployments?
A production deployment takes 3 hours because it runs all tests.
How do you handle destructive changes (deleting metadata) in deployments?
A field and an Apex class must be removed from production.
What branching strategy works well for Salesforce teams?
Three teams release on different cadences to the same org.
What is DevOps Center?
Admins want version control without learning Git commands.
How do you manage environment-specific configuration across orgs?
Named credential endpoints, email addresses and feature flags differ between QA, UAT and production.
How do you resolve metadata merge conflicts, especially profiles and layouts?
Every sprint ends with painful conflicts in Admin.profile-meta.xml.
How do you deploy a large release with minimal downtime?
A quarterly release touches 400 components including Apex, flows and permission sets.
What is the Salesforce CLI (sf) used for?
Basic DevOps question.
How do you manage data in deployments, like custom metadata vs reference data?
A feature needs 50 configuration rows and 200 product records in every environment.
What static analysis do you run on Salesforce code?
A team wants automated quality and security checks.
How do you set up JWT authentication for CI to deploy to Salesforce?
GitHub Actions must deploy to a sandbox without storing a password.
What is the "happy soup" problem?
A mature org has years of unstructured metadata.
How do you test flows and declarative automation in CI?
Most of the org's logic is in flows, but CI only runs Apex tests.
What is the purpose of a staging or pre-production environment?
Releases often fail in production due to differences from UAT.
How do you manage Salesforce seasonal releases in your pipeline?
Spring release will upgrade production in 6 weeks.
What is the role of feature flags in Salesforce DevOps?
A feature must be deployed now but enabled for only a pilot group next month.
What makes a good Apex unit test?
Code coverage is 85% but bugs still reach production.
How do you test asynchronous Apex (future, queueable, batch)?
A queueable job enqueued from a trigger is never executed in tests.
How do you mock HTTP callouts in Apex tests?
Tests fail with "Methods defined as TestMethod do not support Web service callouts".
What is a test data factory and why use one?
Every test class creates Accounts differently and breaks when a new required field is added.
How do you test code that behaves differently by user permissions?
A controller should block users without the Approver permission.
How do you achieve meaningful coverage for triggers with a framework?
A trigger handler has branches for insert, update, delete and undelete.
What is dependency injection and how does it help Apex testing?
A service class directly calls a selector that queries 6 objects, making tests slow.
What is Test.loadData and when is it useful?
Complex pricing tests need 300 product records with specific values.
How do you test platform events in Apex?
A trigger on a platform event creates records; tests show nothing happening.
What is the 75% code coverage rule and its pitfalls?
Deployment fails with "Average test coverage across all Apex Classes and Triggers is 74%".
How do you handle flaky Apex tests?
Tests pass locally but fail randomly in CI with lock errors or unexpected data.
What is UAT and how do you organise it for a Salesforce release?
Business users must sign off a new case management process.
How do you write tests for LWC components?
LWC components have no automated tests.
How do you performance-test a Salesforce implementation?
A new contact centre will have 800 concurrent agents.
What is regression testing and how do you automate it for Salesforce UI?
Every release breaks something in the opportunity flow.
How do you test code that uses Custom Metadata?
Logic depends on custom metadata rules that differ between orgs.
How do you test governor limit safety?
A trigger works for single records but fails on data loads.
What is the difference between unit, integration and end-to-end tests in Salesforce?
A junior developer asks how many kinds of tests they should write.
How do you test Apex REST services?
A custom REST endpoint has no tests.
What are good practices for test class naming and organisation?
Team standards discussion.
What is a change set and what are its limitations?
A small team deploys with change sets and wants to know whether to move on.
What is the package.xml manifest?
Basic Metadata API question.
What is the Metadata API vs Tooling API?
A developer wants to query Apex class information programmatically.
How do you plan a release calendar for a Salesforce program?
Several teams release whenever they are ready, causing conflicts.
What is a sandbox strategy for a medium-sized team?
Ten developers and admins, two integrations, monthly releases.
A deployment fails in production but succeeded in UAT. What do you check?
Production validation fails with missing dependencies and test failures.
What is semantic versioning for Salesforce packages?
A package team needs a versioning policy.
How do you handle a production hotfix?
A critical bug blocks order creation in production.
What is the difference between managed and unmanaged packages?
Basic packaging question.
What tools are commonly used for Salesforce DevOps?
An interviewer asks which tools you have used.
How do you back up and restore Salesforce data and metadata?
A bad data load corrupted 200,000 Account records.
What is Code Review in a Salesforce team and what do you look for?
You are asked to review a pull request with a new trigger and LWC.
How do you migrate a team from change sets to a Git-based process?
A team of six admins and two developers has never used Git.
What does "metadata drift" mean, and how do you detect it?
Production behaves differently from UAT despite the same release.
How do you deploy permission changes safely?
A new field is deployed but users cannot see it in production.
How would you implement a Salesforce DevOps maturity roadmap?
A CIO wants to move from manual releases to continuous delivery within a year.
What is a scratch org definition file?
Quick question about scratch orgs.
How do you handle sensitive data in test environments for compliance?
An auditor asks whether developers can see customer data.
What is a smoke test after deployment?
Release night checklist question.
How do you design commit messages and work item traceability?
Auditors want to trace each production change to an approved requirement.
A validation deploy to production passes, but the quick deploy option is missing. Why?
Release night: the validated deployment cannot be quick-deployed.
What is sfdx-git-delta and why is it popular?
Full deployments of a large repo take 90 minutes.
How do you seed test data in scratch orgs automatically?
Every developer spends an hour creating sample records after creating a scratch org.
How do you manage API versions across a Salesforce project?
Quick DevOps question.
What is a pull request template for Salesforce changes and what should it include?
Reviewers lack context in pull requests.
How do you prevent admins' production changes from being overwritten by deployments?
A deployment overwrote a list view an admin edited in production.
How do you test integrations end to end in a sandbox?
ERP integration bugs only appear in production.
What is the difference between DevOps Center and Copado or Gearset?
A team evaluates DevOps tools.
How do you deploy Experience Cloud sites through a pipeline?
Site changes are made manually in each environment.
What are good practices for writing deployable, environment-independent Apex?
Code fails in UAT because of a hard-coded user Id.
How do you roll back a bad Salesforce release?
A release broke opportunity saving for all users.
What is test-driven development in Apex and does it work on Salesforce?
A team wants to try TDD.
How do you monitor production after a release?
Issues are reported by users hours after release.
Explain the role of a release manager in a Salesforce program.
Behavioural question about release roles.
What is the purpose of a code freeze?
Quick release management question.
How do you maintain a healthy test suite as the org grows?
Running all tests takes 3 hours and many are redundant.
How do you test permission sets and access as part of CI?
A deployment removed field access and users lost data visibility.
What is the "test pyramid" applied to Salesforce?
A QA lead asks how to balance tests.
How would you set up GitHub Actions for Salesforce validation on pull requests?
You need a starter workflow.
What do DORA metrics measure and how do they apply to Salesforce teams?
Leadership wants to measure DevOps improvement.
What is the sfdx-project.json file?
Basic SFDX question.
What is the difference between retrieve and pull in Salesforce CLI?
Quick CLI question.
What is a .forceignore file?
Quick question.
What is the difference between validation and deployment?
Quick question.
How do you deploy only specific tests with the CLI?
Live command question.
What is a scratch org snapshot?
Creating scratch orgs with packages takes 30 minutes.
What should a release note include?
Business users ask what changed.
How do you test email-sending code?
Tests must verify that emails would be sent.
What is mutation testing and is it useful for Apex?
A lead wants to measure test quality beyond coverage.
How do you manage secrets in CI pipelines for Salesforce?
A private key for JWT auth is committed to the repo.
What is the role of a QA engineer in a Salesforce team?
Behavioural question.
How do you deal with metadata that cannot be deployed via API?
Some settings must be configured manually in each org.
What is continuous integration in a Salesforce context?
Basic DevOps question.
How do you validate flows during CI?
Broken flows slip into releases.
What is the purpose of the Apex Test Execution page?
Quick question.
How do you keep sandboxes in sync with production?
Sandboxes drift and testing becomes unreliable.
What is an artifact-based deployment?
Releases differ between UAT and production because of rebuilds.
How do you test permission set changes before release?
A permission change accidentally removed access for sales.
What is the "definition of done" for a Salesforce user story?
Team agreement discussion.
How do you handle multiple teams deploying to the same production org?
Three teams overwrite each other's changes.