BlackFriday 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
23 days 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
24 days 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
3 days ago
Let's go with Option C and D for the test class.
upvoted 0 times
...
Paulene
6 days ago
Definitely, Option D is a good choice to prevent that.
upvoted 0 times
...
Tawanna
8 days ago
Yeah, chaining jobs during test execution would be a disaster.
upvoted 0 times
...
...
Malinda
1 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
Ammie
2 days ago
We should make sure the running user has the right permissions on the Order object.
upvoted 0 times
...
Virgilio
14 days ago
I agree, seeAllData=True is not necessary for this test.
upvoted 0 times
...
Pamella
26 days ago
Option B and C are the way to go for the test class.
upvoted 0 times
...
...
Heidy
2 months ago
I also believe we should implement Test.isRunningTest() to prevent chaining jobs during test execution.
upvoted 0 times
...
Tresa
2 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
24 days ago
That's a good point, we don't want any unexpected behavior during test execution.
upvoted 0 times
...
Bev
1 months ago
Make sure to also implement Test.isRunningTest() to prevent chaining jobs.
upvoted 0 times
...
Vilma
1 months ago
Agreed, that will ensure the Queueable job runs properly during the test.
upvoted 0 times
...
Lajuana
1 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
2 months ago
I agree with Wenona. That's important for testing Queueable jobs.
upvoted 0 times
...
Frank
2 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
1 months ago
Yeah, option B says we need the View All permission on the Order object.
upvoted 0 times
...
William
1 months ago
I think we need to make sure the test user has the right permissions.
upvoted 0 times
...
...
Wenona
2 months ago
I think we need to enclose System.enqueueJob(new OrderQueueableJob()) within Test.startTest() and Test.stopTest().
upvoted 0 times
...

Save Cancel