They most certainly do get automatically deleted. If they weren't purged periodically they would eventually add up to a significant number of records.
Looking in the Dev org I'm currently connected to I can see
ApexTestRunResult records dating back to 14-Jan-20 1:36:57 AM. So about a month ago.
Note that all the
ApexTestRunResult records are parented by an
AsyncApexJob via the
AsyncApexJobId field. If anything were to delete the AsyncApexJob record the corresponding test run result would also be deleted.
There is a doc that indicates Salesforce automatically deletes these AsyncApexJob records:
Completed AsyncApexJob records are automatically purge by salesforce after 7 days.
Oddly, that timeframe seems to contradict the currently month of examples in my dev org.
It is possible that someone used the
System.purgeOldAsyncJobs(dt); method to explicitly remove the jobs before Salesforce automatically purged them.
Another possibility, perhaps more likely, is the Clear Test Data button from the Apex Test Execution history page or the equivalent from the Developer Console Test > Clear Test Data option. Those immediately remove the