Cyber Monday 2024! 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 11 Question 100 Discussion

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

A developer created 2 class that implements the Queueable Interface, as follows:

As part of the deployment process, the developer is asked to create a corresponding test class.

Which two actions should the developer take to successfully execute the test class?

Choose 2 answers

Show Suggested Answer Hide Answer
Suggested Answer: B, C

Contribute your Thoughts:

Aretha
2 months ago
I wonder if the developer has a penchant for creating Queueable jobs. They should really consider a career as a professional queue-master. On a serious note, I'd go with B and C.
upvoted 0 times
...
Therese
2 months ago
Haha, imagine if the developer tried to chain jobs during the test execution. That would be a real mess! Option D is definitely a good idea to prevent that. Let's go with C and D.
upvoted 0 times
Ettie
1 months ago
Let's go with Option C and D for the test class.
upvoted 0 times
...
Paulene
1 months ago
Definitely, Option D is a good choice to prevent that.
upvoted 0 times
...
Tawanna
1 months ago
Yeah, chaining jobs during test execution would be a disaster.
upvoted 0 times
...
...
Malinda
2 months ago
Hmm, I'm not sure about implementing seeAllData=True. Isn't that just for the developer's convenience? We should focus on the actual test requirements. I'd go with options B and C.
upvoted 0 times
Jonelle
26 days ago
Enclosing System.enqueueJob(new OrderQueueableJob()) in Test.startTest() and Test.stopTest() is important for testing.
upvoted 0 times
...
Ammie
1 months ago
We should make sure the running user has the right permissions on the Order object.
upvoted 0 times
...
Virgilio
2 months ago
I agree, seeAllData=True is not necessary for this test.
upvoted 0 times
...
Pamella
2 months ago
Option B and C are the way to go for the test class.
upvoted 0 times
...
...
Heidy
3 months ago
I also believe we should implement Test.isRunningTest() to prevent chaining jobs during test execution.
upvoted 0 times
...
Tresa
3 months ago
Enclosing the job execution within Test.startTest() and Test.stopTest() is crucial to prevent any unexpected behavior during the test. Option C is the right choice here.
upvoted 0 times
Stephaine
2 months ago
That's a good point, we don't want any unexpected behavior during test execution.
upvoted 0 times
...
Bev
2 months ago
Make sure to also implement Test.isRunningTest() to prevent chaining jobs.
upvoted 0 times
...
Vilma
2 months ago
Agreed, that will ensure the Queueable job runs properly during the test.
upvoted 0 times
...
Lajuana
3 months ago
Option C is definitely the way to go. It's important to enclose the job execution within Test.startTest() and Test.stopTest().
upvoted 0 times
...
...
Rosio
3 months ago
I agree with Wenona. That's important for testing Queueable jobs.
upvoted 0 times
...
Frank
3 months ago
Ah, I see the problem. We need to ensure the test user has the necessary permissions to execute the Queueable job. Looks like option B is the way to go.
upvoted 0 times
Erasmo
2 months ago
Yeah, option B says we need the View All permission on the Order object.
upvoted 0 times
...
William
3 months ago
I think we need to make sure the test user has the right permissions.
upvoted 0 times
...
...
Wenona
3 months ago
I think we need to enclose System.enqueueJob(new OrderQueueableJob()) within Test.startTest() and Test.stopTest().
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