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 DEX-450 Exam - Topic 12 Question 3 Discussion

Which approach should be used to provide test data for a test class?
C) Use a test data factory class to create test data.
A) Query for existing records in the database.
B) Execute anonymous code blocks that create data.
D) Access data in @TestVisible class variables.

Salesforce DEX-450 Exam - Topic 12 Question 3 Discussion

Actual exam question for Salesforce's DEX-450 exam
Question #: 3
Topic #: 12
[All DEX-450 Questions]

Which approach should be used to provide test data for a test class?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

0/2000 characters
Glenna
10 months ago
Test data factories are the best way to go!
upvoted 0 times
...
Dulce
10 months ago
Wait, can we really use @TestVisible for this? Sounds odd.
upvoted 0 times
...
Taryn
10 months ago
A is fine, but it can lead to flaky tests.
upvoted 0 times
...
Rana
11 months ago
I disagree, option B is way more flexible!
upvoted 0 times
...
Teresita
11 months ago
I usually go with option C, it's super efficient.
upvoted 0 times
...
Donette
11 months ago
Accessing @TestVisible variables seems useful, but I think it might limit the flexibility of the test data.
upvoted 0 times
...
Marguerita
11 months ago
I feel like querying existing records could lead to issues with test isolation, but I can't recall the specifics.
upvoted 0 times
...
Stephane
11 months ago
I remember practicing with anonymous code blocks to create data, but I wonder if that's the most efficient way to handle it.
upvoted 0 times
...
Rodolfo
11 months ago
I think using a test data factory class is a good approach, but I'm not entirely sure if it's the best option for every scenario.
upvoted 0 times
...
Angella
11 months ago
Okay, I've got a strategy for this. I'll first eliminate any options that don't seem relevant, then focus on the remaining choices and try to determine the most likely answer based on my understanding of charge plans.
upvoted 0 times
...
Celia
11 months ago
I can't recall if the FMC allows recovery after a purge, but I think I leaned towards option B being incorrect based on our discussions.
upvoted 0 times
...
Malinda
11 months ago
I remember something about pricing related to demand during peak times, but I'm struggling to remember the exact term. Incremental rates? Maybe?
upvoted 0 times
...

Save Cancel