Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam Platform Developer II Topic 7 Question 96 Discussion

Actual exam question for Salesforce's Platform Developer II exam
Question #: 96
Topic #: 7
[All Platform Developer II Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: B, C

Contribute your Thoughts:

Teresita
8 days ago
I'm going to have to go with Option B. Creating a TestDataFactory and calling it from each test method seems more modular and reusable than the other options.
upvoted 0 times
...
Casandra
18 days ago
I personally prefer option A. Turning off triggers, flows, and validations can significantly speed up the tests.
upvoted 0 times
...
Chantay
22 days ago
Option C seems like the best solution. Setting up the prerequisite data in a @testSetup method will ensure it's only run once before the tests, rather than in each individual test method.
upvoted 0 times
Carlton
3 days ago
B: That's a good point. It can definitely help improve the speed of the unit tests.
upvoted 0 times
...
Tasia
6 days ago
A: Option C seems like the best solution. Setting up the prerequisite data in a @testSetup method will ensure it's only run once before the tests, rather than in each individual test method.
upvoted 0 times
...
...
Brandon
22 days ago
I disagree, I believe option C is the way to go. It will help keep the setup organized and separate from the test methods.
upvoted 0 times
...
Natalya
24 days ago
I think option B is the best choice. It will make the tests faster and more efficient.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77