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.
Explanation:
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.
[Reference:, Code Coverage Requirement, Option D: At least one line of code must be executed for the Apex trigger., Correct Requirement., Explanation:, 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., Reference:, Trigger Coverage Requirement, Options Not Suitable:, Option A: All methods in the test classes must use @isTest., Partially Correct., Explanation:, 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., Reference:, Defining Test Methods, Option C: Test methods must be declared with the testMethod keyword., Outdated Practice., Explanation:, 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:, 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., , ]