nerdexam
Salesforce

PDI · Question #190

What are two considerations for deploying from a sandbox to production? Choose 2 answers

The correct answer is B. All triggers must have at least one line of test coverage. C. At least 75% of Aptx code must be covered by unit tests.. When deploying Apex code from a sandbox to production, all triggers must have at least one line of test coverage, and the overall Apex code coverage must be at least 75%.

Submitted by naveen.iyer· Apr 18, 2026Testing, Debugging, and Deployment

Question

What are two considerations for deploying from a sandbox to production? Choose 2 answers

Options

  • AShould deploy during business hours to ensure feedback can be Quickly addressed
  • BAll triggers must have at least one line of test coverage.
  • CAt least 75% of Aptx code must be covered by unit tests.
  • DUnit tests must have calls to the System.assert method.

How the community answered

(29 responses)
  • A
    3% (1)
  • B
    93% (27)
  • D
    3% (1)

Why each option

When deploying Apex code from a sandbox to production, all triggers must have at least one line of test coverage, and the overall Apex code coverage must be at least 75%.

AShould deploy during business hours to ensure feedback can be Quickly addressed

Deploying during business hours is generally discouraged for critical changes, as it can disrupt users; deployments are often scheduled during off-peak hours or maintenance windows to minimize impact.

BAll triggers must have at least one line of test coverage.Correct

Salesforce deployment requirements mandate that every Apex trigger in a deployment must have at least one line of test coverage, ensuring basic functionality is tested before deployment to production.

CAt least 75% of Aptx code must be covered by unit tests.Correct

To successfully deploy Apex code to a production environment, the overall code coverage for all Apex classes and triggers in the organization (or within the deployment package, depending on specific settings) must meet a minimum threshold of 75% by unit tests.

DUnit tests must have calls to the System.assert method.

While it is a best practice to include `System.assert` methods in unit tests to validate expected outcomes, it is not a mandatory deployment requirement for test classes to pass; tests pass as long as they run without uncaught exceptions and cover the required percentage of code.

Concept tested: Apex deployment validation requirements

Source: https://developer.salesforce.com/docs/atlas.en-us.deployment.meta/deployment/deploy_test_levels.htm

Topics

#Deployment#Code Coverage#Unit Testing#Apex Triggers

Community Discussion

No community discussion yet for this question.

Full PDI Practice