Apple Hardware Test

Intel-based Macs: Using Apple Hardware Test

Summary

Apple Hardware Test (AHT) contains a suite of diagnostics that will test the hardware of your computer. It's a great way to rule out a hardware issue when troubleshooting your computer.

Note: Be sure to disconnect any external devices, printers, hard drives, scanners, and so on (other than the Apple keyboard and mouse) from your Apple computer before starting up to Apple Hardware Test and running the diagnostic.

To start up your computer in Apple Hardware Test:

1)    Press the power button to turn on your computer.

2)    Press and hold the D key before the gray startup screen appears. If Apple Hardware Test does not start up, see the Additional Information section at the end of this article.
Note: Some Macintosh computers that shipped with OS X Lion support the use of Apple Hardware Test over the Internet. These computers will start up to an Internet-based version of AHT if the hard drive does not contain AHT.  An Internet-enabled connection via Ethernet or Wi-Fi is required to use this feature.

3)    It takes a minute or so for Apple Hardware Test to start up and inspect your hardware configuration. While this is taking place, an icon appears on the screen:


4)    When the process is complete, select your language and click the right arrow. If you aren't using a mouse, you can use the up and down arrows to select a language and then press the Return key.

5)    The Apple Hardware Test console appears. You can choose which sort of test or tests to perform:
  • To perform all of the basic tests, click the Test button or press the "T" key or the Return key.
  • To perform a more thorough diagnostic test, select the "Perform extended testing" checkbox under the Test button before you click the Test button.
Your test results will appear in the window in the bottom-right of the console.

To exit AHT, click Restart or Shut Down at the bottom of the window.

Source:
http://support.apple.com/kb/HT1509