I use loadData method very often in my test methods for custom settings and objects where lookup fields are not necessary for my case. Now, I ran into a situation where I need to create hundreds of test records. They are all configuration records. The object has self relationship and it is 4 level deep.
Ex: An Account has 3 child accounts and each child has 4 grand-child accounts and each grand child has 10 children. In total they are in hundreds. The sad part is, I need all of them for my test cases.
I don't want to use seeAllData = true and wondering if I can build relationships with in CSV (Single or multiple) and use it in my test method. Or is there any other better way of doing this? Thanks.