Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 285 discussion

Actual exam question from Salesforce's CRT-450
Question #: 285
Topic #: 1
[All CRT-450 Questions]

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 two.)

  • A. Apex classes must have at least 75% code coverage org-wide.
  • B. At least one line of code must be executed for the Apex trigger.
  • C. All methods in the test classes must use @isTest.
  • D. Test methods must be declared with the testMethod keyword.
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
semio
1 year, 8 months ago
Selected Answer: AB
You must have at least 75% of your Apex covered by unit tests to deploy your code to production environments. All triggers must have at least one line of test coverage. We recommend that you have 100% of your code covered by unit tests, where possible.
upvoted 2 times
JackOld17
1 year, 2 months ago
With A, I agree, but I think B might be a trap. The wording in the qustion is "At least one line of code must be executed for the Apex trigger," which sets a rule that the test needs to cover at least one line of the trigger. However, in the question, it is formulated as "executing." Therefore, the correct answer to this question might be A and C. But i not sure for 100%
upvoted 1 times
Slovojed
8 months, 2 weeks ago
Not all methods in test class must use "@isTest". You can have a helper method there that is not test method.
upvoted 1 times
GirishN9
4 months, 2 weeks ago
Test methods must be declared with the testMethod keyword: Test methods in test classes must be declared using the testMethod keyword to ensure they are identified as test methods by Salesforce. This ensures that they are included in the code coverage calculations and can be executed as part of the deployment validation process. So, ensuring that the trigger has at least one line of code executed and that test methods are declared using the testMethod keyword are important factors to consider when deploying modifications involving Apex triggers and trigger handler classes.
upvoted 1 times
...
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...