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
6 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
16 days ago
I personally prefer option A. Turning off triggers, flows, and validations can significantly speed up the tests.
upvoted 0 times
...
Chantay
20 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
19 hours ago
B: That's a good point. It can definitely help improve the speed of the unit tests.
upvoted 0 times
...
Tasia
4 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
20 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
22 days ago
I think option B is the best choice. It will make the tests faster and more efficient.
upvoted 0 times
...

Save Cancel