Courseiva

SF-PD2 Testing, Debugging, and Deployment Practice Question

A developer needs to deploy a complex Apex class and its corresponding test class to production. The org's unit test coverage is currently 74%. Which statement accurately describes the deployment requirements?

⚠ Common exam trap

Candidates frequently confuse the 75% requirement with a per-class requirement, mistakenly believing individual classes must hit 75% rather than the total aggregate of the entire organization.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

The deployment will fail because the aggregate code coverage must be at least 75%.

Salesforce mandates a minimum of 75% code coverage for all Apex classes and triggers in an organization to deploy to production. Since the current coverage is 74%, the deployment will fail unless the new tests push the total organization coverage above the required threshold. This rule ensures that developers maintain high-quality code and provides a safety net against regressions, emphasizing the critical importance of writing effective tests during development.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    The deployment will succeed because unit tests only need to be written for the new code.

    Why it's wrong here

    Deployment requirements are based on the entire organization's code coverage, not just the new components. Even if the new class has 100% coverage, if the aggregate org-wide coverage remains below 75%, the deployment attempt will be blocked by the metadata API. The total coverage must meet the minimum threshold requirements.

  • ✓

    The deployment will fail because the aggregate code coverage must be at least 75%.

    Why this is correct

    The platform requires that at least 75% of all Apex code in the org is covered by tests during production deployment. Since the current coverage is 74%, the developer must either improve existing tests or include sufficient tests for the new code to push the overall aggregate above the 75% limit.

  • ✗

    The developer can bypass the coverage requirement by using the 'Ignore Warnings' flag in deployment.

    Why it's wrong here

    There is no 'Ignore Warnings' flag that bypasses the fundamental code coverage requirement for production deployments. This constraint is a hard gate enforced by Salesforce to prevent the introduction of untested or unstable code into production environments, which could potentially cause system-wide failures or unpredictable data behavior for end users.

  • ✗

    The deployment will succeed if the new Apex class itself has 75% coverage.

    Why it's wrong here

    The 75% requirement applies to the entire organization, not individual classes. While individual classes should ideally have high coverage, the deployment check calculates the average coverage across all Apex code in the org. If the total average falls below 75%, the entire deployment package will be rejected by the system.

About these practice questions

One of 226 original SF-PD2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Salesforce exam blueprint

This SF-PD2 practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-PD2 exam.