nerdexam
Salesforce

CRT-450 · Question #47

Which two statements are true about using the @testSetup annotation in an Apex test class? Choose 2 answers

The correct answer is B. Qo The @testSetup annotation is not supported when the GisTest(SeeAllData=True) annotation D. A method defined with the @testSetup annotation executes once for each test method in the test. See the full explanation below for the reasoning.

Question

Which two statements are true about using the @testSetup annotation in an Apex test class? Choose 2 answers

Options

  • ARecords created in the test setup method cannot be updated in individual test methods.
  • BQo The @testSetup annotation is not supported when the GisTest(SeeAllData=True) annotation
  • CTest data is inserted once for all test methods in a class.
  • DA method defined with the @testSetup annotation executes once for each test method in the test

How the community answered

(49 responses)
  • A
    10% (5)
  • B
    84% (41)
  • C
    6% (3)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice