Which approach can efficiently generate the required data for each unit test?

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

Which approach can efficiently generate the required data for each unit test?
A . Use @TestSetup with a viod method.
B . Create test data before Test.startTest() in the unit test.
C . Add @isTest(seeAllData=true) at the start of the unit test class.
D . Create a nock using the Stud API

Answer: A

Latest PDI Practice Questions with 191 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
0 Comments