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 Platform Developer I Topic 2 Question 93 Discussion

Actual exam question for Salesforce's Platform Developer I exam
Question #: 93
Topic #: 2
[All Platform Developer I Questions]

While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors.

Why did the method fail in the sandbox test framework but succeed in the Developer Console?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

An
5 days ago
I'm going with C. The test method must be relying on existing data in the sandbox, which might not be present in the test environment.
upvoted 0 times
...
Linn
15 days ago
I believe the test method failed because it is calling an @future method, which is not supported in the sandbox test framework.
upvoted 0 times
...
Clay
18 days ago
I agree with Shawna. The test method might be expecting certain data that is not available in the sandbox.
upvoted 0 times
...
Kaitlyn
19 days ago
Hmm, I think it's option B. The @future method could be causing the issue in the test runner, but working fine in the Execute Anonymous window.
upvoted 0 times
Lemuel
18 hours ago
A) The test method does not use system. runAs to execute as a specific user.
upvoted 0 times
...
...
Shawna
24 days ago
I think the method failed in the sandbox test framework because it relies on existing data in the sandbox.
upvoted 0 times
...

Save Cancel