nerdexam
Salesforce

CRT-450 · Question #100

A developer needs to create a baseline set of data (Account, Contacts, Products, Assets) for an entire suite allowing them to test independent requirements for various types of Salesforce Cases…

The correct answer is A. Use &TestSteup with a void method. See the full explanation below for the reasoning.

Question

A developer needs to create a baseline set of data (Account, Contacts, Products, Assets) for an entire suite allowing them to test independent requirements for various types of Salesforce Cases. Which approach can efficiently generate the required data for each unit test?

Options

  • AUse &TestSteup with a void method.
  • BCreate test data before Test.startTest in the unit test.
  • CCreate a mock using the Stub APL.
  • DAdd $ IsTest (seeAllDatatrue) at the start of the unit test class.

How the community answered

(52 responses)
  • A
    81% (42)
  • B
    12% (6)
  • C
    2% (1)
  • D
    6% (3)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice