The hardware test would do a general test of the logic board, the chipset, and a cursory test of internal storage. The bulk of the test (particularly on the extended test) is for the RAM. The other tests flash by very quickly by comparison, likely less than 5 or 10 seconds out of the longer RAM test. The amount of memory installed is the main factor deciding the duration of the test.
An Apple store, or an authorized service provider, would have a more comprehensive test suite to run.
You could also search for a download for the "Apple Service Diagnostics 3S138", which is the correct version for a Late 2009 iMac. That's Apple's proprietary hardware test, which does a few extra tests compared to the Hardware test.