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)- A9% (3)
- B3% (1)
- C74% (25)
- D15% (5)
Community Discussion
No community discussion yet for this question.