Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - 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:

Lynelle
1 months ago
You know, I once had a test that passed in the console but failed in the runner because I forgot to mock a callout. Maybe it's something like that?
upvoted 0 times
Lonny
19 days ago
A) The test method does not use system. runAs to execute as a specific user.
upvoted 0 times
...
...
Raymon
2 months ago
Haha, I bet the developer forgot to include a semicolon somewhere. Classic mistake! Gotta be option D.
upvoted 0 times
Carey
4 days ago
C) The test method relies on existing data in the sandbox.
upvoted 0 times
...
Chi
5 days ago
B) The test method is calling an @future method.
upvoted 0 times
...
Josefa
8 days ago
A) The test method does not use system. runAs to execute as a specific user.
upvoted 0 times
...
...
An
2 months 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
Mari
14 days ago
C) The test method relies on existing data in the sandbox.
upvoted 0 times
...
Jospeh
20 days ago
B) The test method is calling an @future method.
upvoted 0 times
...
Isidra
2 months ago
A) The test method does not use system. runAs to execute as a specific user.
upvoted 0 times
...
...
Linn
2 months 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
2 months ago
I agree with Shawna. The test method might be expecting certain data that is not available in the sandbox.
upvoted 0 times
...
Kaitlyn
2 months 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
Sylvie
1 months ago
D) The test method has a syntax error in the code.
upvoted 0 times
...
Thaddeus
1 months ago
C) The test method relies on existing data in the sandbox.
upvoted 0 times
...
Huey
2 months ago
B) The test method is calling an @future method.
upvoted 0 times
...
Lemuel
2 months ago
A) The test method does not use system. runAs to execute as a specific user.
upvoted 0 times
...
...
Shawna
3 months 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