Salesforce
CRT-450 · Question #148
A developer is creating a test coverage for a class and needs to insert records to validate functionality. Which method annotation should be used to create records 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 creating a test coverage for a class and needs to insert records to validate functionality. Which method annotation should be used to create records for every method in the test class?
Options
- A@BeforeTest
- B@isTest(SeeAllData=True)
- C@TestSetup
- D@PreTest
How the community answered
(51 responses)- A4% (2)
- B10% (5)
- C73% (37)
- D14% (7)
Community Discussion
No community discussion yet for this question.