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

Which two statements are true about using the @testSetup annotation in an Apex test class? Choose 2 answers
A . Records created in the test setup method cannot be updated in individual test methods.
B . Qo The @testSetup annotation is not supported when the GisTest(SeeAllData=True) annotation is used.
C . Test data is inserted once for all test methods in a class.
D . A method defined with the @testSetup annotation executes once for each test method in the test class and counts towards system limits.

Answer: B,D

Latest PDI Dumps Valid Version with 191 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
1 Comment
Inline Feedbacks
View all comments
Imara
Imara
2 years ago

B and C are correct. “Records that are created in a test setup method are available to all test methods in the test class and are rolled back at the end of test class execution. If a test method changes those records, such as record field updates or record deletions, those changes are rolled back after each test method finishes execution. The next executing test method gets access to the original unmodified state of those records.”