Salesforce Platform Developer I (legacy) — Question 159

A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. The developer team decided that the trigger should be tested with 200 account records with unique names.

What two things should be done to create the test data within the unit test with the least amount of code? (Choose two.)

Answer options

Correct answer: B, D

Explanation

Option B is correct because creating a static resource allows for easy management and reuse of test data while keeping the code minimal. Option D is also correct as Test.loadData provides a straightforward way to load bulk test data into the test methods. Options A and C are not ideal for this scenario as they relate to testing with existing data or parallel execution, which does not address the need for generating unique account records.