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
7 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
17 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
20 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
21 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
Huey
16 hours ago
B) The test method is calling an @future method.
upvoted 0 times
...
Lemuel
3 days ago
A) The test method does not use system. runAs to execute as a specific user.
upvoted 0 times
...
...
Shawna
26 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
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