Salesforce Developer Interview Question

Your deployment passed in the sandbox but fails when you validate against production. What do you check?

What the interviewer is probing, how to structure your answer, and a spoken example you can adapt.

Quick answer

Read the actual failures first: they are usually test failures, coverage below 75 per cent, or missing dependencies. Then look at what differs between the orgs. Production may have validation rules or automation added since the sandbox refresh, metadata changed directly in production, or data the tests rely on that only exists in the sandbox. Fix the underlying cause, then align the sandbox and process so it does not recur.

Why interviewers ask this

Production deployment failures are a regular part of Salesforce work, and the interviewer wants a calm, systematic approach. They listen for reading the real errors, understanding that production runs every local test and enforces overall coverage, and recognising drift between environments, such as configuration changed directly in production. Suggesting long term fixes like source driven development and regular sandbox refreshes shows you prevent the problem rather than firefight it.

How to structure your answer

  • Read the deployment errors and sort them into categories.
  • Check test and coverage failures and why they differ.
  • Look for drift between production and the sandbox.
  • Fix the cause and stop the drift recurring.

Example answer

Spoken example, first person

Failures fall into a few buckets. Missing components mean the package left out something production needs, like a field my class references or a permission set. Test failures need more thought, because production runs all our local tests, not just mine, and fails if overall coverage drops below 75 per cent. When tests pass in the sandbox but fail in production, the difference is usually the environment. Someone may have added a validation rule or a flow directly in production since the last refresh, so test data that was valid in the sandbox is now rejected. Or a test depends on records that only exist in the sandbox, which is a test design bug. On one release, an admin had added a required field in production, and three older test classes that created accounts all failed. The fix was updating the test data factory, not the classes. Longer term, the answer is pulling production configuration into source control, refreshing sandboxes regularly, and routing admin changes through the same pipeline.

Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.

See how it works

Follow-up questions to expect

  • How would you stop admins changing production directly?
  • What would you do if a managed package's tests were the ones failing?
  • How do you handle a release that must go out tonight despite a failing test?

Related salesforce developer questions

Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.

Predict my questions

Rehearse the hard questions before they are asked

Practise with a live copilot, then walk in ready. A $29 Session Pass gets you through the interview with no subscription and no lock-in.

Get GhostPilot