BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam CRT-450 Topic 6 Question 61 Discussion

Actual exam question for Salesforce's CRT-450 exam
Question #: 61
Topic #: 6
[All CRT-450 Questions]

A developer created this Apex trigger that calls Myclass.myStaticMethod:

The developer creates a test class with a test method that calls MyClass.myStaticMethod directly, resulting in 81% overall code coverage.

What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Nana
23 days ago
I'm going with D. The trigger has no coverage, so the deployment is going to fail. Gotta make sure everything is properly tested, you know?
upvoted 0 times
...
Clorinda
24 days ago
Haha, I love how the developer just decided to test the static method directly. That's a classic move, but it's not going to fly with the deployment requirements.
upvoted 0 times
Pa
7 days ago
The trigger won't deploy with just 81% code coverage.
upvoted 0 times
...
Queenie
11 days ago
Yeah, testing the static method directly won't cut it for deployment.
upvoted 0 times
...
...
Carey
1 months ago
Hmm, I'm not sure about that. Isn't it a requirement to have coverage for every Apex class and trigger that's being deployed? D seems more likely to be the correct answer.
upvoted 0 times
Gail
1 days ago
But what about option A? It mentions that the trigger will not deploy.
upvoted 0 times
...
Erin
2 days ago
I believe option D is correct because the test method directly calls the static method.
upvoted 0 times
...
Gracia
9 days ago
I think you're right, D does seem like the correct answer.
upvoted 0 times
...
...
Lavonne
1 months ago
But doesn't the trigger also contribute to the overall code coverage?
upvoted 0 times
...
Florinda
2 months ago
I believe the deployment will fail because no assertions were made in the test method.
upvoted 0 times
...
Harrison
2 months ago
I think the answer is C. As long as the overall code coverage is above 75%, the deployment should pass, even if the trigger itself has no coverage.
upvoted 0 times
Rosita
10 days ago
That makes sense. So the deployment should pass in this case.
upvoted 0 times
...
Brett
11 days ago
It shouldn't matter as long as the overall code coverage is above 75%.
upvoted 0 times
...
Nancey
23 days ago
But what if the trigger itself has no code coverage?
upvoted 0 times
...
Juliann
27 days ago
I agree, option C seems to be the correct answer.
upvoted 0 times
...
...
Lavonne
2 months ago
I think the deployment will pass because the code has 81% coverage.
upvoted 0 times
...

Save Cancel