Where is the Apple Hardware Test?
The Apple Hardware Test (AHT) is a limited but useful hardware diagnostic tool that comes preloaded on all new (2008 and later) Macs.
The folder containing the AHT is located in /System/Library/CoreServices/
Note that the .diagnostics folder and contents are invisible so you may need to run a program like InVisibles to view the folder.
While the software will stay intact when upgrading to a new OS like Snow Leopard, the AHT is machine specific and does not come with stand alone versions of OS X. In other words, if you format your hard drive and install OS X from a retail copy, AHT will not be included.
To insure that AHT is installed, you’ll need to restore your OS from your original restore disks if you format your drive. AHT will be carried over if you do a clone upgrade but not if you just do a data migration.
You can also run AHT directly from your restore disks by holding down the “D” key with the disk installed on boot.
When you hold down the “D” key on boot, the EFI will first scan the optical drive, then hard drives to look for the .diagnostics folder.
You can read more about how to use AHT here.

