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 PDII 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
1 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
1 months ago
Haha, 'seeAllData=True'? What is this, sandbox mode? C and D all the way, my dude.
upvoted 0 times
Laura
5 days ago
Absolutely, Test.isRunningTest() is essential to prevent chaining jobs during test execution.
upvoted 0 times
...
Arthur
10 days ago
Agreed, using Test.startTest() and Test.stopTest() is the best practice for testing Queueable jobs.
upvoted 0 times
...
Cristen
18 days ago
Yeah, 'seeAllData=True' is definitely not the way to go. C and D are the correct actions.
upvoted 0 times
...
...
Cecil
2 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
Gail
1 days ago
I agree, B and D are the way to go for the test class.
upvoted 0 times
...
Malcolm
6 days ago
Great, with B and D covered, the test class should execute successfully.
upvoted 0 times
...
Lisbeth
9 days ago
Agreed, D is also crucial to prevent chaining jobs during test execution.
upvoted 0 times
...
Leandro
19 days ago
Yes, B is important to make sure the test class has the necessary permissions.
upvoted 0 times
...
...
Yaeko
2 months ago
I'm not sure about option A, it doesn't seem necessary for the test class.
upvoted 0 times
...
Johnetta
2 months ago
I agree with Rosalind, option C and D seem like the correct actions to take.
upvoted 0 times
...
Rosalind
2 months ago
I think we should choose option C and D for the test class.
upvoted 0 times
...
Tresa
2 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
2 months ago
D) Implement Test.isRunningTest() to prevent chaining jobs during test execution.
upvoted 0 times
...
Junita
2 months ago
C) 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