exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 49 discussion

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

How should a developer avoid hitting the governor limits in test methods?

  • A. Use @TestVisible on methods that create records.
  • B. Use Test.loadData() to load data from a static resource.
  • C. Use @IsTest (SeeAllData=true) to use existing data.
  • D. Use Test.startTest() to reset governor limits.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Brinuz
Highly Voted 11 months, 2 weeks ago
D is correct: "Any code that executes after the call to startTest and before stopTest is assigned a new set of governor limits." https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_tools_start_stop_test.htm
upvoted 5 times
...
irina_735
Most Recent 10 months, 3 weeks ago
D is correct
upvoted 3 times
...
BaptisteBerard
1 year ago
B is correct https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_load_data.htm
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 ...