I have an object with a required lookup field. I want to use
Test.loadData() to load hundreds of records from a CSV for unit testing for this object, but I want the unit test to be portable, meaning I can't hardcode the lookup Id.
This seems like an extremely common scenario, but I've had little luck finding any solutions to this scenario. Do I have to generate different CSV files for different orgs, or is there something obvious I'm missing?
As an example, how could I load User records from a CSV, given that
ProfileId is a required field?