Chapter 4 of 4 · Salesforce Platform Developer

Testing, Debugging, and Deployment

Apex tests, test data, Salesforce DX and CLI, debug logs, async jobs and deployment.

  • 4topics
  • 17 minfast track
  • 2diagrams and exhibits
  • 20%of the exam

Topics in this chapter

Take them in order, or jump to the one you need.

  1. 1Testing Triggers, Classes, Controllers and FlowsApex testing for Platform Developer: test classes, test data, TestSetup, startTest and stopTest, runAs, callout mocks, coverage…4 min
  2. 2Salesforce DX, the Salesforce CLI and the Developer ConsoleSalesforce developer tools: Salesforce DX, source-driven development, scratch orgs, Dev Hub, sf CLI commands, Code Builder and…4 min
  3. 3Debugging Flows, Performance and Asynchronous JobsDebugging on Salesforce: debug logs, trace flags, log levels, flow debugging and fault paths, performance, and monitoring…Diagram5 min
  4. 4Deployment Environments, Requirements and ProcessDeploying Apex and metadata: sandboxes and scratch orgs, change sets, CLI and packages, test levels, 75% coverage, validation and…Diagram4 min

About this chapter

What this chapter covers

Testing, Debugging, and Deployment is 20% of the Salesforce Certified Platform Developer exam. It covers writing tests for triggers, controllers, classes and flows with test data, Salesforce DX, the Salesforce CLI and the Developer Console, debugging and monitoring flows, performance and asynchronous jobs, and deployment environments and requirements.

Questions are mostly scenarios and short code samples: you choose the code, feature or fix that meets a requirement, or predict what a piece of Apex does. Expect real Apex, SOQL and JavaScript syntax and real governor-limit numbers.

How the topics fit together

Write codeTest75 percent coverageDebuglogs and trace flagsDeployCLI or change set

Code is tested with Apex test classes, problems are found with debug logs, and changes move from a development environment to production through a deployment that runs tests.

Exam tip

Coverage alone is not quality. Tests must assert results, use their own data and cover bulk cases of 200 records.

How to use these pages

Each topic page has the same shape, so you can skim for what you need.

  • What it is: the idea in plain words.
  • How it works: the mechanism, with tables and code examples.
  • What to remember for the exam: the facts to memorise and how questions are phrased.
  • Common mistakes: the classic traps.
  • Check yourself: three questions to test your understanding.

Ready for more practice?

The full Salesforce Platform Developer question bank has 645 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Salesforce. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.