No, it doesn't take years and the testing is performed, roughly, as I just described it.
They build a test rig with 10,000 drives which they run continuously producing a total "drive hours" count and then wait for the first one or two or ten drives to fail.
X failures / 10,000,000 drive-hours will give you your MTBF, etc. ... and only takes ~40 days given a 10k drive test rig.
Some pictures from Seagate lab in Longmont:
https://cdn.mos.cms.futurecdn.net/yHqDagRDz9H5koWBefi24K-120...
https://cdn.mos.cms.futurecdn.net/EiZ9tA6p3UbaJFTaW75JdN.jpg