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 CRT-450 Topic 4 Question 45 Discussion

Actual exam question for Salesforce's CRT-450 exam
Question #: 45
Topic #: 4
[All CRT-450 Questions]

A developer at AW Computing is tasked to create the supporting test class for a programmatic customization that leverages records stored within the custom object,

Pricing Structure c. AW Computing has a complex pricing structure for each item on the store, spanning more than 500 records.

hich two approaches can the developer use to ensure Pricing _Structure__c records are available when the test class is executed?

Choose 2 answers

Show Suggested Answer Hide Answer
Suggested Answer: A, C

Contribute your Thoughts:

Micaela
3 months ago
I'm not sure about D, but A and C seem like the most reliable options to make sure the test data is prepped properly. Can't go wrong with those.
upvoted 0 times
Myra
2 months ago
C) Use the Test.loadData{} method.
upvoted 0 times
...
Yvonne
2 months ago
B) Use the @IsTest(seeAllData=true) annotation.
upvoted 0 times
...
William
2 months ago
A) Use a Test Data Factory class.
upvoted 0 times
...
...
France
3 months ago
I'm not sure about the @testSetup annotation, it might not work for this scenario.
upvoted 0 times
...
Cathrine
3 months ago
Haha, 'without shering on the class declaration'? I think they meant 'without sharing', but that's a pretty funny typo. Anyway, I'd go with A and C as well.
upvoted 0 times
Brett
2 months ago
Definitely, those two options should ensure the Pricing Structure records are available for testing.
upvoted 0 times
...
Ligia
2 months ago
I agree, using the Test.startTest{} method is also a solid choice.
upvoted 0 times
...
Jess
2 months ago
Yeah, that typo made me chuckle too. A Test Date Factory class sounds like a good idea.
upvoted 0 times
...
...
Louis
3 months ago
I also think using the Test.loadData{} method could be a good option to ensure the data is available.
upvoted 0 times
...
Flo
3 months ago
I agree, it would ensure the Pricing Structure records are available during the test.
upvoted 0 times
...
Milly
3 months ago
I would avoid using @isTest(seeAllData=true) if possible. That can make the tests more fragile and dependent on external data. A and C seem like the safer choices.
upvoted 0 times
Sabra
2 months ago
Yeah, I think using the Test.startTest{} method is also a safe choice.
upvoted 0 times
...
Crissy
2 months ago
Yes, using Test.loadData{} method is also a safe choice.
upvoted 0 times
...
Sage
3 months ago
I agree, using a Test Data Factory class is a good approach.
upvoted 0 times
...
Quentin
3 months ago
I think using a Test Data Factory class is a good approach.
upvoted 0 times
...
Fabiola
3 months ago
I agree, using @isTest(seeAllData=true) can make tests fragile.
upvoted 0 times
...
...
Marsha
4 months ago
A and C look like good options to me. We definitely need to ensure the test data is available, and the Test.loadData{} method seems like the way to go.
upvoted 0 times
Nilsa
3 months ago
I agree, using Test.loadData{} method should do the trick.
upvoted 0 times
...
Buck
3 months ago
A and C are good choices. We need to make sure the test data is there.
upvoted 0 times
...
Blondell
3 months ago
C) Use the Test.loadData{} method.
upvoted 0 times
...
Yen
3 months ago
A) Use a Test Data Factory class.
upvoted 0 times
...
...
Tandra
4 months ago
I think using a Test Data Factory class is a good approach.
upvoted 0 times
...
Shawna
4 months ago
I agree with Nan, having access to all data is crucial for testing complex pricing structures.
upvoted 0 times
...
Nan
4 months ago
I think using the @raTeat (seeAllData=true) annotation is essential for this scenario.
upvoted 0 times
...
Jestine
4 months ago
I disagree, I believe option B) and D) are more appropriate choices.
upvoted 0 times
...
Son
4 months ago
I think option A) and C) should be used.
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