Salesforce Certified Platform Developer II (Plat-Dev-301) PDII Question # 25 Topic 3 Discussion

Salesforce Certified Platform Developer II (Plat-Dev-301) PDII Question # 25 Topic 3 Discussion

PDII Exam Topic 3 Question 25 Discussion:
Question #: 25
Topic #: 3

A company notices that their unit tests in a test class with many methods to create many records for prerequisite reference data are slow.

What can a developer to do address the issue?


A.

Turn off triggers, flows, and validations when running tests.


B.

Move the prerequisite reference data setup to a TestDataFactory and call that from each test method.


C.

Move the prerequisite reference data setup to a @testSetup method in the test class.


D.

Move the prerequisite reference data setup to the constructor for the test class.


Get Premium PDII Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.