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 2 Question 94 Discussion

Actual exam question for Salesforce's Platform Developer II exam
Question #: 94
Topic #: 2
[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:

Jesusita
3 months ago
I'm going with C and D. Enclosing the job in Test.startTest() and Test.stopTest() is key, and the isRunningTest() check is just smart thinking.
upvoted 0 times
...
Rosenda
3 months ago
Haha, 'seeAllData=True'? What is this, sandbox mode? C and D all the way, my dude.
upvoted 0 times
Laura
2 months ago
Absolutely, Test.isRunningTest() is essential to prevent chaining jobs during test execution.
upvoted 0 times
...
Arthur
2 months ago
Agreed, using Test.startTest() and Test.stopTest() is the best practice for testing Queueable jobs.
upvoted 0 times
...
Cristen
3 months ago
Yeah, 'seeAllData=True' is definitely not the way to go. C and D are the correct actions.
upvoted 0 times
...
...
Cecil
4 months ago
B and D for sure. You don't want any permissions issues during the test, and you definitely need to prevent chaining jobs.
upvoted 0 times
Melda
2 months ago
Good point, permissions and preventing chaining jobs are crucial for testing Queueable classes.
upvoted 0 times
...
Raul
2 months ago
Definitely, those two actions will ensure a successful test execution.
upvoted 0 times
...
Gail
2 months ago
I agree, B and D are the way to go for the test class.
upvoted 0 times
...
Malcolm
2 months ago
Great, with B and D covered, the test class should execute successfully.
upvoted 0 times
...
Lisbeth
2 months ago
Agreed, D is also crucial to prevent chaining jobs during test execution.
upvoted 0 times
...
Leandro
3 months ago
Yes, B is important to make sure the test class has the necessary permissions.
upvoted 0 times
...
...
Yaeko
4 months ago
I'm not sure about option A, it doesn't seem necessary for the test class.
upvoted 0 times
...
Johnetta
4 months ago
I agree with Rosalind, option C and D seem like the correct actions to take.
upvoted 0 times
...
Rosalind
4 months ago
I think we should choose option C and D for the test class.
upvoted 0 times
...
Tresa
4 months ago
C and D seem like the right choices. Gotta make sure the Queueable job runs properly in the test class.
upvoted 0 times
Sharee
4 months ago
D) Implement Test.isRunningTest() to prevent chaining jobs during test execution.
upvoted 0 times
...
Junita
4 months ago
C) Enclose System.enqueueJob(new OrderQueueableJob()) within Test.startTest() and Test.stopTest().
upvoted 0 times
...
...

Save Cancel