nerdexam
Salesforce

CRT-450 · Question #107

A developer is writing tests for a class and needs to insert records to validate functionality. Which annotation method should be used to create record for every method in the test class?

The correct answer is C. @TestSetup. See the full explanation below for the reasoning.

Question

A developer is writing tests for a class and needs to insert records to validate functionality. Which annotation method should be used to create record for every method in the test class?

Options

  • A@isTest (SeeAllData-true)
  • B@FreTest
  • C@TestSetup
  • D@StartTest

How the community answered

(34 responses)
  • A
    9% (3)
  • B
    3% (1)
  • C
    74% (25)
  • D
    15% (5)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice