
SalesforceCertified Platform Developer II
Domain 7Objective 1
Describe the Best Practices for Unit Testing in Apex. PLATFORM-DEVELOPER-II Practice Questions (Page 3)
Part of the TESTING domain, which accounts for 7% of the PLATFORM-DEVELOPER-II exam.
31questions here
7free pages
10concepts
7%of the exam
Questions 11–15
- 11
What is the purpose of Test.getLimitQueries() in an Apex test?
Select an answer first - 12
A developer is testing a class that makes a callout to an external service and then updates a record based on the response. The class handles both success and failure responses. The developer wants to achieve high coverage. Which test approach is most effective?
Select an answer first - 13
Why is it important to test Apex code as a standard user rather than as the system administrator?
Select an answer first - 14
Which annotation is used to define a method that runs once before any test methods in a test class?
Select an answer first - 15
A developer is testing a method that performs a DML operation and then calls another method that may throw an exception. The test must verify that the exception is thrown and that the DML operation is rolled back. Which test pattern should the developer use?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by Salesforce. “PLATFORM-DEVELOPER-II” is a trademark of its owner, used for identification only.