Valid PDI Dumps shared by ExamDiscuss.com for Helping Passing PDI Exam! ExamDiscuss.com now offer the newest PDI exam dumps, the ExamDiscuss.com PDI exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com PDI dumps with Test Engine here:
A developer completed modifications to a customized feature that is comprised of two elements: * Apex trigger * Trigger handler Apex class What are two factors that the developer must take into account to properly deploy the modification to the production environment? Choose 2 answers
Correct Answer: B,D
When deploying Apex code to a production environment, certain requirements must be met regarding test coverage and annotations. Option B: Apex classes must have at least 75% code coverage org-wide. Correct Requirement. Salesforce requires that all Apex classes and triggers have a combined code coverage of at least 75% before deployment to production. This means that, across all Apex code in the org, at least 75% of the code must be covered by test methods. Every trigger must have some test coverage, even if the overall code coverage is above 75%. Specifically, triggers must have at least 1% code coverage. Test methods should be annotated with @isTest. However, it's not mandatory that all methods in a test class use @isTest; helper methods within test classes can be private or public methods without the annotation. Only the test methods themselves need the @isTest annotation. The testMethod keyword is deprecated but still supported. The preferred approach is to use the @isTest annotation. Using testMethod is not recommended for new code. Reference: Code Coverage Requirement Option D: At least one line of code must be executed for the Apex trigger. Correct Requirement. Trigger Coverage Requirement Options Not Suitable: Option A: All methods in the test classes must use @isTest. Partially Correct. Defining Test Methods Option C: Test methods must be declared with the testMethod keyword. Outdated Practice. Deprecated testMethod Keyword Conclusion: The two factors the developer must take into account are B (75% code coverage org-wide) and D (At least 1% coverage for triggers). These are mandatory requirements for deploying Apex code to production.