Courseiva

SF-PD2 Testing, Debugging, and Deployment Practice Question

A developer has written an Apex class that includes a method to calculate shipping costs. The method contains several conditional branches. The developer wants to ensure that all branches are tested and that the test class provides sufficient coverage for deployment. Which Salesforce feature should the developer use to identify which lines of code are not covered by tests?

⚠ Common exam trap

Many exam-takers confuse overall coverage percentages shown in test results with line-level coverage, which is only available in the Code Coverage view of the Developer Console.

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 Code Coverage view in the Developer Console

The Code Coverage view in the Developer Console is the correct tool because it provides a visual representation of which lines of code are executed during tests. Uncovered lines are highlighted in red, enabling developers to quickly identify and address gaps in test coverage. This is essential for meeting deployment requirements.

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 Apex Test Coverage report in Salesforce Reports

    Why it's wrong here

    Salesforce Reports do not include a standard report type for Apex test coverage. While you can create custom reports on some objects, test coverage data is not stored in a reportable object. Therefore, this option is not a valid method to view line-level coverage.

  • ✗

    The Apex Test Execution page in Setup

    Why it's wrong here

    The Apex Test Execution page allows you to run tests and view results, including pass/fail status and code coverage percentages, but it does not provide line-by-line coverage details. It shows overall coverage for each class, not which specific lines are uncovered. To see line-level coverage, you need a different tool.

  • ✗

    The Developer Console's Test > New Run feature

    Why it's wrong here

    The Developer Console's test runner shows test results and overall coverage percentages, but it does not highlight uncovered lines within the source code. It provides a summary, not a detailed line-by-line view. Developers often use it to run tests but not to pinpoint coverage gaps.

  • ✓

    The Code Coverage view in the Developer Console

    Why this is correct

    The Code Coverage view in the Developer Console displays a list of classes and their coverage percentages. When you open a class, it highlights covered lines in blue and uncovered lines in red, allowing developers to see exactly which lines lack test coverage. This is the correct tool for identifying uncovered code.

About these practice questions

Courseiva writes every SF-PD2 question from scratch — 226 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.