hiexam
salesforce · CRT-450 · Q605 · multiple_choice · topic_1

A developer wants multiple test classes to use the same set of test data. How should the developer create the test data?

A developer wants multiple test classes to use the same set of test data. How should the developer create the test data?
  • A.Reference a test utility class in each test class.
  • B.Define variables for test records in each test class.
  • C.Create a Test Setup method for each test class.
  • D.Use the SeeAllData=true annotation in each test class.
Explanation
The correct answer is A. Reference a test utility class in each test class. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_utility_classes.htm

Reference: examtopics_top_comment

Practice with progress tracking

Sign in to track wrong answers, get spaced-repetition reminders, and run timed exam mode.