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

Posted by: Pdfprep Category: PDI Tags: , ,

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