Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Question 15 of 90
Free Preview · 90 of 299 · questions 1–90 of 299 are free. Sign up free to sync your progress across devices.
Select 2 answers.
This question asks for 2 answers, but our data marks only 1. Compare with the community discussion below for the full answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
A. The @testSetup annotation cannot be used when the @isTest(SeeAllData=True) annotation is used. > YES "If the test class or a test method has access to organization data by using the @isTest(SeeAllData=true) annotation, test setup methods aren’t supported in this class." B. Test data is inserted once for all test methods in a class. > YES "create test records once" C. Records created in the @testSetup method cannot be updates in individual test methods. > NO "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." > so we the test method can update those records. D. The @testSetup method is automatically executed before each test method in the test class is executed. > NO "those changes are rolled back after each test method finishes execution." > it's not re-executed since it's not re-inserted, only what has been changed is rolled back. source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_testsetup_using.htm
Right answer : AB
Test data are visible for all test methods -> B