Use Case - Tired of writing many lines of codes just to create test data in test methods. Also, over the time, because of change in business requirement, you need to add/remove/modify fields from those test records. If yes, then Test.loadData() is best for you. Say we want to write a test method, in which we need to insert account records and its associated contact records. Before Test.loadData() , the only option was to create explicit account records insert them and then create contact records. Also you need to establish relation between account & contact records. If you need 1000 account & 2000 contact records, you can assume how many line of codes you need to write just for creation of test records. Solution - Use Test.loadData() to create records using csv file and using just a single line of code. Taking above problem in mind, let us discuss how to do it. Let us first create a new field ( FakeId ) (API Name - FakeId__c ) on both Account & a n...