PD1 Developer Fundamentals 2 — Questions and Answers
Question 1: Which Salesforce development tool allows developers to authenticate orgs, push/pull source, and run Apex tests from the command line?
- Salesforce DX CLI (sf/sfdx) (Correct answer)
- Force.com Migration Tool
- Workbench
- Change Sets
Correct answer: Salesforce DX CLI (sf/sfdx)
Salesforce DX CLI (sf/sfdx) provides commands for org authentication, source push/pull, and running Apex tests from the terminal.
Question 2: What is the purpose of a scratch org in Salesforce DX?
- A persistent production-like org for UAT testing
- A temporary, configurable org spun up for development and testing (Correct answer)
- A sandboxed copy of the production org
- A read-only org for reporting
Correct answer: A temporary, configurable org spun up for development and testing
Scratch orgs are temporary, source-driven environments used during development that expire after a set number of days.
Question 3: In Salesforce DX project structure, where is metadata stored by default?
- force-app/main/default/ (Correct answer)
- src/metadata/
- deploy/package/
- metadata/classes/
Correct answer: force-app/main/default/
By default, Salesforce DX projects store metadata in the force-app/main/default/ directory following the source format.
Question 4: Which statement about Salesforce sandboxes is TRUE?
- Full sandboxes are refreshed daily automatically
- Developer sandboxes include all production data by default
- Partial Copy sandboxes include a subset of production data based on a sandbox template (Correct answer)
- Full sandboxes can only be refreshed once per year
Correct answer: Partial Copy sandboxes include a subset of production data based on a sandbox template
Partial Copy sandboxes use a sandbox template to copy a representative subset of production records.
Question 5: What does the @IsTest annotation do when applied to an Apex class?
- It marks the class as deprecated and prevents deployment
- It excludes the class from code coverage calculations and org limits (Correct answer)
- It forces the class to run in System mode
- It enables debug logging for the class automatically
Correct answer: It excludes the class from code coverage calculations and org limits
The @IsTest annotation excludes the test class from org code coverage requirements and Apex governor limits.
Question 6: Which deployment method requires a successful change set upload before deployment can proceed?
- Salesforce DX source push
- Metadata API deploy
- Change Sets (Correct answer)
- ANT Migration Tool
Correct answer: Change Sets
Change Sets require an outbound change set to be uploaded from the source org before it appears in the target org for deployment.
Question 7: What is the primary benefit of using version control with Salesforce DX source format over traditional metadata API format?
- Source format compresses files for faster deployment
- Source format splits large files (like profiles) into granular, diffable components (Correct answer)
- Source format eliminates the need for sandbox environments
- Source format automatically resolves merge conflicts
Correct answer: Source format splits large files (like profiles) into granular, diffable components
Source format decomposes monolithic metadata files like profiles into smaller per-object files, making them easier to diff and merge.
Which Salesforce development tool allows developers to authenticate orgs, push/pull source, and run Apex tests from the command line?