Courseiva
Free · No account needed · No credit card

Salesforce Certified Platform Developer II Practice Test

226 questions with instant explanations, domain breakdown, and wrong-answer analysis. Built for the real exam.

Instant feedback after each answer
Full explanations included
Domain score breakdown
Real exam: 120 min
Pass mark: 70%

Sample questions with explanations

This is exactly what you see during practice — question, options, and a full explanation after you answer.

Q1Advanced Developer Fundamentalsmedium
Full explanation →

When designing a unit test for a class that makes callouts, which pattern is the industry standard for ensuring the test does not actually send requests?

AAdding the @IsTest(SeeAllData=true) annotation to the test method.
Using the System.Test.setMock() method with an implementation of HttpCalloutMock.Correct
CWrapping the callout code in a try-catch block to bypass execution.
DConfiguring a Remote Site Setting for the test domain.

The HttpCalloutMock interface is the standard way to handle external requests in tests. Since Apex unit tests are prohibited from making actual network calls, implementing this interface allows developers to define a static response. This pattern is essential for creating determi…Read full explanation

Q2Advanced Developer Fundamentalseasy
Full explanation →

A developer needs to dynamically instantiate a class at runtime based on a string value. Which feature should they use?

ASystem.JSON.deserialize()
Type.forName()Correct
CString.valueOf()
DClass.getInstance()

The Type class in Apex provides the ability to perform dynamic instantiation using the forName method. This is a common pattern in advanced development, particularly for implementing factory patterns or plugin architectures where the specific implementation class is determined by…Read full explanation

Q3Advanced Developer Fundamentalsmedium
Full explanation →

A developer is building a lightning component that needs to communicate with an external API. What is the recommended way to handle the secure storage of API credentials?

AStoring the credentials in a custom metadata record.
Using Named Credentials with an authentication provider.Correct
CEncrypting the credentials in a custom setting field.
DEmbedding the credentials as static constants in an Apex class.

Named Credentials are the Salesforce-recommended way to store API authentication details. They abstract the authentication process, manage the storage of sensitive tokens securely, and eliminate the need for hardcoding credentials in Apex or Lightning components. This approach si…Read full explanation

What's covered

Questions are tagged by exam domain. Practice a specific domain or mix them all.

Untimed Practice

Answer at your own pace. Explanation and domain tag shown immediately after each answer.

Timed Practice

Countdown timer starts immediately. Results and domain scores shown at the end — just like the real exam.

Why practice here?

Full explanations on every question

Not just the right answer — you get exactly why each wrong option is wrong, so you learn the concept, not the answer.

Domain score breakdown

After each session see your score by exam domain so you know exactly where to focus study time.

100% free, forever

No subscription, no trial, no email wall. Start a session in under 10 seconds.

Exam-style questions

Scenario-based, precise wording, realistic distractors — written to match what you actually see on exam day.

← All SF-PD2 questionsSF-PD2 exam guideStudy guidePractice by domain