nerdexam
Salesforce

PDI · Question #13

A developer needs to have records with specific field values in order to test a new Apex class. What should the developer do to ensure the data is available to the test?

Sign in or unlock PDI to reveal the answer and full explanation for question #13. The question stem and answer options stay visible for context.

Submitted by thandi_sa· Apr 18, 2026Testing, Debugging, and Deployment

Question

A developer needs to have records with specific field values in order to test a new Apex class. What should the developer do to ensure the data is available to the test?

Options

  • AUse Anonymous Apex to create the required data.
  • BUse Test.loadDataO < > and reference a CSV file in a static resource.
  • CUse SOQL to query the org for the required data.
  • DUse Test.loadDataO and reference a JSON file in Documents.

Unlock PDI to see the answer

You've previewed enough free PDI questions. Unlock PDI for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Apex Testing#Test Data Management#Test.loadData#Static Resources
Full PDI Practice