Salesforce PD1 - Platform Developer I - Apex SOQL LWC Triggers Testing Deployment

By Jamie Foster · Updated May 25, 2026

Questions25
Passing Score75%
Format100% Multiple Choice
Sessions Logged1,657
Your progressLog in / Register to track times taken, best score, questions mastered, and coverage on this quiz.
Rating
Community rating 4.4 out of 5 from 12 ratings.
4.4 (12)

Topics covered

This quiz

Uncategorized25 (100%)

Uncategorized25 questions

Question catalog for this preview

Catalog listing of the 5 preview questions for this quiz.

Question 1

A developer is deploying Apex classes and triggers from a Developer Sandbox to Production. What is required by Salesforce for the deployment to succeed?

Answer choices

  • A. At least 75% code coverage across all Apex code in the org, including all trigger tests passing

  • B. At least 75% code coverage across ALL Apex code in the org (not just the code being deployed), with no test method failures — every trigger must have at least 1% coverage

  • C. 100% code coverage on the specific classes being deployed

  • D. Code coverage is only required for Apex Triggers, not Apex classes

Question 2

A developer deploys code using the Salesforce CLI (sf deploy metadata). The deployment includes an Apex Trigger with an associated test class. Which command validates the deployment in a Sandbox WITHOUT actually deploying?

Answer choices

  • A. sf deploy metadata --target-org MySandbox --check-only --test-level RunSpecifiedTests --tests MyTriggerTest

  • B. sf deploy metadata --target-org MySandbox --dry-run

  • C. sf test run --target-org MySandbox

  • D. sf deploy metadata --target-org MySandbox --validate

Question 3

A developer needs to make a callout to an external REST API from an Apex trigger. The API call is synchronous and may take up to 3 seconds. What is the correct Apex architecture for this callout?

Answer choices

  • A. Make the callout directly in the trigger using HttpRequest in a loop for each record

  • B. Callouts are not allowed directly in Apex Triggers (after DML has been performed in the same transaction); use a @future method or Queueable Apex to execute the callout asynchronously after the trigger transaction completes

  • C. Use a Scheduled Apex class to batch all callouts every hour

  • D. Use a Platform Event to trigger a Flow that makes the callout

Question 4

A developer needs to write an Apex class that sends different email templates based on whether a Case is "Technical" or "Billing" type. The email recipient is the Case Contact. Which Apex email approach is MOST flexible for selecting templates dynamically?

Answer choices

  • A. Use System.debug() to log which template should be sent

  • B. Use Messaging.SingleEmailMessage with setTemplateId() to select the appropriate email template based on Case type: query the EmailTemplate record for the appropriate template name/API name, set the templateId on the SingleEmailMessage, set targetObjectId to the Case Contact, and use saveAsActivity=true to log the email

  • C. Use Process Builder to send emails based on Case type

  • D. Use Workflow Rules with two Email Alert actions, one for each type

Question 5

A developer is writing code that needs to determine if the current code execution is running in a test context (inside a @isTest method). Which Apex method detects this?

Answer choices

  • A. Trigger.isTest

  • B. System.isRunningTest()

  • C. Test.isRunning()

  • D. Database.isTest()