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:

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
15 days ago
A) The test method does not use system. runAs to execute as a specific user.
upvoted 0 times
...
...
Raymon
1 months ago
Haha, I bet the developer forgot to include a semicolon somewhere. Classic mistake! Gotta be option D.
upvoted 0 times
Chi
17 hours ago
B) The test method is calling an @future method.
upvoted 0 times
...
Josefa
4 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
10 days ago
C) The test method relies on existing data in the sandbox.
upvoted 0 times
...
Jospeh
16 days ago
B) The test method is calling an @future method.
upvoted 0 times
...
Isidra
1 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
2 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