Cyber Monday 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 Platform Developer II Topic 7 Question 3 Discussion

Actual exam question for Salesforce's Platform Developer II exam
Question #: 3
Topic #: 7
[All Platform Developer II Questions]

An Apex class does not achieve expected code coverage. The testSetup method explicitly calls a method in the Apex class. How can the developer generate the code coverage?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Sandip Mondal
8 months ago
For code coverage, method of a class should be invoked from a testMethod instead of testSetup. testSetup is used to setup test data in a test class
upvoted 1 times
Sandip Mondal
8 months ago
Answer here should be C
upvoted 1 times
Mike Kang
7 months ago
No, Sandip, you're wrong. When an Apex class is invoked in testsetup, it increases coverage. Though I agree that a function which needs to be tested should be invoked from a @IsTest method.. anyway C doesn't matter.
upvoted 1 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