Why did the test method fail in the sandbox and pass in the Developer Console?

A developer observes that an Apex test method fails in the Sandbox. To identify the issue, the developer copies the code inside the test method and executes it via the Execute Anonymous tool in the Developer Console. The code then executes with no exceptions or errors.

Why did the test method fail in the sandbox and pass in the Developer Console?
A . The test method has a syntax error in the code.
B . The test method relies on existing data in the sandbox.
C . The test method is calling an @future method.
D . The test method does not use System.runAs to execute as a specific user.

Answer: B

Latest PDI Dumps Valid Version with 191 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments