In an org with Person Accounts enabled, it possible to use
Test.loadData() to load test Account records from a .csv file as Person Accounts (not as Business Accounts), but without hardcoding their RecordTypeIds in the CSV?
EDIT: So far, I've experimented with a few solutions, to no avail.
Attempt 1: Loading the Account records from a CSV with only the following three columns:
Id, FirstName, LastName
When I did this, I was unable to replicate the behavior detailed in Inserting person accounts in test mode in which Salesforce automatically knows what type of Account to create based on what fields are populated. Upon calling
Test.loadData(), I received an error stating that the required field
Name was missing, which I believe corresponds to Business Accounts.
When I added the fourth column, Name, to the existing csv as an experiment, calling
Test.loadData() successfully inserted the Account records, but as expected, they were Business Accounts, and the FirstName and LastName fields on the inserted Accounts were null.
Attempt 2: Loading the Account records from a csv with no RecordTypeIds, then later dynamically assigning RecordTypeIds through Apex.
In addition to the Account CSV (with four columns, including Name, since I can't get around the Name required field error), I loaded Contacts from a CSV with columns:
Id, AccountId, FirstName, LastName, such that each Contact only looked up to one Account, and no Contact looked up to the same Account.
In a test setup method, after loading the Accounts and Contacts from their respective Static Resource CSVs, I queried for one Person Account Record Type. Then, I iterated through the list of loaded Accounts, and assigned the Id of the queried Record Type to each Account's RecordTypeId. I assigned no other values to any other field on any other object.
Then, I called a DML update on the list of Account records. That is when I receive the error:
Cannot specify any additional fields when marrying or separating a Person-Account: 
Attempt 3: Adding the IsPersonAccount column to the CSV, with values
The loaded records had IsPersonAccount set to
true, but they were created with a RecordTypeId corresponding to Business Accounts.