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 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
4 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
4 months ago
Haha, 'seeAllData=True'? What is this, sandbox mode? C and D all the way, my dude.
upvoted 0 times
Laura
3 months ago
Absolutely, Test.isRunningTest() is essential to prevent chaining jobs during test execution.
upvoted 0 times
...
Arthur
3 months ago
Agreed, using Test.startTest() and Test.stopTest() is the best practice for testing Queueable jobs.
upvoted 0 times
...
Cristen
4 months ago
Yeah, 'seeAllData=True' is definitely not the way to go. C and D are the correct actions.
upvoted 0 times
...
...
Cecil
5 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
3 months ago
Good point, permissions and preventing chaining jobs are crucial for testing Queueable classes.
upvoted 0 times
...
Raul
3 months ago
Definitely, those two actions will ensure a successful test execution.
upvoted 0 times
...
Gail
3 months ago
I agree, B and D are the way to go for the test class.
upvoted 0 times
...
Malcolm
3 months ago
Great, with B and D covered, the test class should execute successfully.
upvoted 0 times
...
Lisbeth
3 months ago
Agreed, D is also crucial to prevent chaining jobs during test execution.
upvoted 0 times
...
Leandro
4 months ago
Yes, B is important to make sure the test class has the necessary permissions.
upvoted 0 times
...
...
Yaeko
5 months ago
I'm not sure about option A, it doesn't seem necessary for the test class.
upvoted 0 times
...
Johnetta
5 months ago
I agree with Rosalind, option C and D seem like the correct actions to take.
upvoted 0 times
...
Rosalind
5 months ago
I think we should choose option C and D for the test class.
upvoted 0 times
...
Tresa
5 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
5 months ago
D) Implement Test.isRunningTest() to prevent chaining jobs during test execution.
upvoted 0 times
...
Junita
5 months ago
C) Enclose System.enqueueJob(new OrderQueueableJob()) within Test.startTest() and Test.stopTest().
upvoted 0 times
...
...

Save Cancel