Salesforce Decode
Salesforcedecode
All interview topics

DevOps & Testing Interview Questions

Sandboxes, SFDX, packaging, CI/CD pipelines, test strategy, and release management.

100 unique questions in this topicDrill in practice mode →

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
DevOps & Testing architecture diagram

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

Intermediatedevopssfdxsource-control

What is source-driven development on Salesforce?

A team still builds in production and copies changes with change sets.

Intermediatesandboxdevopsscratch-orgs

What is the difference between scratch orgs and sandboxes?

A team debates whether to adopt scratch orgs.

Advanceddevopspackagingunlocked-packages

What are unlocked packages and why use them?

A large org with 3,000 Apex classes wants clearer boundaries between teams.

Advanceddevopsci-cdpipeline

How do you design a CI/CD pipeline for Salesforce?

A team of 15 developers needs automated validation and deployments with GitHub.

Intermediatetestingdeploymentdevops

What test levels are used in Salesforce deployments?

A production deployment takes 3 hours because it runs all tests.

Advanceddeploymentdevopsdestructive-changes

How do you handle destructive changes (deleting metadata) in deployments?

A field and an Apex class must be removed from production.

Advanceddevopsbranchinggit

What branching strategy works well for Salesforce teams?

Three teams release on different cadences to the same org.

Intermediatedevopsdevops-center

What is DevOps Center?

Admins want version control without learning Git commands.

Advanceddevopsenvironmentsconfiguration

How do you manage environment-specific configuration across orgs?

Named credential endpoints, email addresses and feature flags differ between QA, UAT and production.

Advanceddevopsgitmerge-conflicts

How do you resolve metadata merge conflicts, especially profiles and layouts?

Every sprint ends with painful conflicts in Admin.profile-meta.xml.

Advanceddeploymentdevopsrelease-management

How do you deploy a large release with minimal downtime?

A quarterly release touches 400 components including Apex, flows and permission sets.

Beginnerdevopssfdxcli

What is the Salesforce CLI (sf) used for?

Basic DevOps question.

Intermediatedevopscustom-metadatadata-deployment

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.

Intermediatedevopscode-qualitystatic-analysis

What static analysis do you run on Salesforce code?

A team wants automated quality and security checks.

Advancedsecuritydevopsjwt

How do you set up JWT authentication for CI to deploy to Salesforce?

GitHub Actions must deploy to a sandbox without storing a password.

Intermediatedevopsmodularityhappy-soup

What is the "happy soup" problem?

A mature org has years of unstructured metadata.

Advancedflowtestingdevops

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.

Intermediatesandboxdevopsenvironments

What is the purpose of a staging or pre-production environment?

Releases often fail in production due to differences from UAT.

Intermediatetestingdevopsseasonal-release

How do you manage Salesforce seasonal releases in your pipeline?

Spring release will upgrade production in 6 weeks.

Advanceddevopsfeature-flagscustom-metadata

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.

Intermediatetestingbest-practicesapex-testing

What makes a good Apex unit test?

Code coverage is 85% but bugs still reach production.

Intermediatetestingapex-testingasync-apex

How do you test asynchronous Apex (future, queueable, batch)?

A queueable job enqueued from a trigger is never executed in tests.

Intermediatetestingcalloutsmocking

How do you mock HTTP callouts in Apex tests?

Tests fail with "Methods defined as TestMethod do not support Web service callouts".

Intermediatetestingtest-data-factory

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.

Intermediatesecuritytestingsystem-run-as

How do you test code that behaves differently by user permissions?

A controller should block users without the Approver permission.

Advancedtestingtriggerstrigger-framework

How do you achieve meaningful coverage for triggers with a framework?

A trigger handler has branches for insert, update, delete and undelete.

Advancedtestingmockingdependency-injection

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.

Intermediatetestingtest-data

What is Test.loadData and when is it useful?

Complex pricing tests need 300 product records with specific values.

Advancedtestingplatform-events

How do you test platform events in Apex?

A trigger on a platform event creates records; tests show nothing happening.

Beginnertestingcode-coverage

What is the 75% code coverage rule and its pitfalls?

Deployment fails with "Average test coverage across all Apex Classes and Triggers is 74%".

Advancedtestingtroubleshootingflaky-tests

How do you handle flaky Apex tests?

Tests pass locally but fail randomly in CI with lock errors or unexpected data.

Beginnertestinguat

What is UAT and how do you organise it for a Salesforce release?

Business users must sign off a new case management process.

Intermediatetestinglwcjest

How do you write tests for LWC components?

LWC components have no automated tests.

Advancedtestingperformance-testinglarge-data-volume

How do you performance-test a Salesforce implementation?

A new contact centre will have 800 concurrent agents.

Intermediatetestingregressionui-automation

What is regression testing and how do you automate it for Salesforce UI?

Every release breaks something in the opportunity flow.

Advancedtestingcustom-metadatamocking

How do you test code that uses Custom Metadata?

Logic depends on custom metadata rules that differ between orgs.

Advancedtestinggovernor-limitsbulk

How do you test governor limit safety?

A trigger works for single records but fails on data loads.

Beginnertestingtest-pyramid

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.

Intermediatetestingapex-rest

How do you test Apex REST services?

A custom REST endpoint has no tests.

Beginnertestingbest-practices

What are good practices for test class naming and organisation?

Team standards discussion.

Beginnerdeploymentdevopschange-sets

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.

Beginnerdevopsmetadata-apimanifest

What is the package.xml manifest?

Basic Metadata API question.

Intermediatedevopstooling-apimetadata-api

What is the Metadata API vs Tooling API?

A developer wants to query Apex class information programmatically.

Intermediatedevopsrelease-managementplanning

How do you plan a release calendar for a Salesforce program?

Several teams release whenever they are ready, causing conflicts.

Intermediatesandboxdevopsenvironments

What is a sandbox strategy for a medium-sized team?

Ten developers and admins, two integrations, monthly releases.

Advanceddeploymenttroubleshootingdevops

A deployment fails in production but succeeded in UAT. What do you check?

Production validation fails with missing dependencies and test failures.

Intermediatedevopsversioningpackaging

What is semantic versioning for Salesforce packages?

A package team needs a versioning policy.

Intermediatedevopsrelease-managementhotfix

How do you handle a production hotfix?

A critical bug blocks order creation in production.

Beginnerdevopspackagingappexchange

What is the difference between managed and unmanaged packages?

Basic packaging question.

Beginnertoolsdevops

What tools are commonly used for Salesforce DevOps?

An interviewer asks which tools you have used.

Intermediatedevopsbackuprestore

How do you back up and restore Salesforce data and metadata?

A bad data load corrupted 200,000 Account records.

Intermediatequalitydevopscode-review

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.

Advanceddevopsmigrationgit

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.

Intermediategovernancedevopsdrift

What does "metadata drift" mean, and how do you detect it?

Production behaves differently from UAT despite the same release.

Intermediatedeploymentdevopspermissions

How do you deploy permission changes safely?

A new field is deployed but users cannot see it in production.

Architectdevopsstrategymaturity

How would you implement a Salesforce DevOps maturity roadmap?

A CIO wants to move from manual releases to continuous delivery within a year.

Intermediatedevopsscratch-orgs

What is a scratch org definition file?

Quick question about scratch orgs.

Intermediatecompliancedevopsdata-mask

How do you handle sensitive data in test environments for compliance?

An auditor asks whether developers can see customer data.

Beginnertestingrelease-managementsmoke-test

What is a smoke test after deployment?

Release night checklist question.

Beginnerdevopsgittraceability

How do you design commit messages and work item traceability?

Auditors want to trace each production change to an approved requirement.

Intermediatetroubleshootingdevopsquick-deploy

A validation deploy to production passes, but the quick deploy option is missing. Why?

Release night: the validated deployment cannot be quick-deployed.

Intermediatedevopsgitdelta-deployment

What is sfdx-git-delta and why is it popular?

Full deployments of a large repo take 90 minutes.

Intermediatedevopsscratch-orgstest-data

How do you seed test data in scratch orgs automatically?

Every developer spends an hour creating sample records after creating a scratch org.

Beginnerdevopsapi-version

How do you manage API versions across a Salesforce project?

Quick DevOps question.

Beginnerqualitydevopspull-requests

What is a pull request template for Salesforce changes and what should it include?

Reviewers lack context in pull requests.

Advancedgovernancedevopsdrift

How do you prevent admins' production changes from being overwritten by deployments?

A deployment overwrote a list view an admin edited in production.

Advancedsandboxtestingintegration-testing

How do you test integrations end to end in a sandbox?

ERP integration bugs only appear in production.

Intermediatetoolscomparisondevops

What is the difference between DevOps Center and Copado or Gearset?

A team evaluates DevOps tools.

Advanceddeploymentexperience-clouddevops

How do you deploy Experience Cloud sites through a pipeline?

Site changes are made manually in each environment.

Intermediateapexbest-practicesdevops

What are good practices for writing deployable, environment-independent Apex?

Code fails in UAT because of a hard-coded user Id.

Advanceddevopsrelease-managementrollback

How do you roll back a bad Salesforce release?

A release broke opportunity saving for all users.

Intermediatetestingapex-testingtdd

What is test-driven development in Apex and does it work on Salesforce?

A team wants to try TDD.

Intermediatemonitoringdevopsrelease-management

How do you monitor production after a release?

Issues are reported by users hours after release.

Beginnerrolesdevopsrelease-manager

Explain the role of a release manager in a Salesforce program.

Behavioural question about release roles.

Beginnerdevopscode-freeze

What is the purpose of a code freeze?

Quick release management question.

Advancedtestingtest-maintenance

How do you maintain a healthy test suite as the org grows?

Running all tests takes 3 hours and many are redundant.

Advancedsecuritytestingpermissions

How do you test permission sets and access as part of CI?

A deployment removed field access and users lost data visibility.

Beginnertestingtest-pyramid

What is the "test pyramid" applied to Salesforce?

A QA lead asks how to balance tests.

Advanceddevopsci-cdgithub-actions

How would you set up GitHub Actions for Salesforce validation on pull requests?

You need a starter workflow.

Intermediatedevopsdora-metrics

What do DORA metrics measure and how do they apply to Salesforce teams?

Leadership wants to measure DevOps improvement.

Beginnerdevopssfdx

What is the sfdx-project.json file?

Basic SFDX question.

Beginnerdevopscli

What is the difference between retrieve and pull in Salesforce CLI?

Quick CLI question.

Beginnerdevopsforceignore

What is a .forceignore file?

Quick question.

Beginnerdeploymentdevops

What is the difference between validation and deployment?

Quick question.

Intermediatetestingdevopscli

How do you deploy only specific tests with the CLI?

Live command question.

Advanceddevopsscratch-orgssnapshots

What is a scratch org snapshot?

Creating scratch orgs with packages takes 30 minutes.

Beginnerdevopsrelease-notes

What should a release note include?

Business users ask what changed.

Intermediateemailtesting

How do you test email-sending code?

Tests must verify that emails would be sent.

Advancedtestingmutation-testing

What is mutation testing and is it useful for Apex?

A lead wants to measure test quality beyond coverage.

Intermediatesecuritydevopssecrets

How do you manage secrets in CI pipelines for Salesforce?

A private key for JWT auth is committed to the repo.

Beginnertestingrolesqa

What is the role of a QA engineer in a Salesforce team?

Behavioural question.

Intermediatedevopsmanual-steps

How do you deal with metadata that cannot be deployed via API?

Some settings must be configured manually in each org.

Beginnerdevopscontinuous-integration

What is continuous integration in a Salesforce context?

Basic DevOps question.

Intermediateflowdevopsci-cd

How do you validate flows during CI?

Broken flows slip into releases.

Beginnertestingapex-testing

What is the purpose of the Apex Test Execution page?

Quick question.

Intermediatesandboxdevopsenvironments

How do you keep sandboxes in sync with production?

Sandboxes drift and testing becomes unreliable.

Advanceddevopspackagingartifacts

What is an artifact-based deployment?

Releases differ between UAT and production because of rebuilds.

Intermediatetestingpermissions

How do you test permission set changes before release?

A permission change accidentally removed access for sales.

Beginnerdevopsdefinition-of-doneagile

What is the "definition of done" for a Salesforce user story?

Team agreement discussion.

Advanceddevopsrelease-managementmulti-team

How do you handle multiple teams deploying to the same production org?

Three teams overwrite each other's changes.