The Apple Hardware Test (AHT) contains a suite of diagnostics that will test the hardware of your computer.
In order to run the test on my (old) Mac Mini I first had to find the original Mac OS installation disk which came with my machine.
Loaded the disk in my machine and did a restart.
Press and hold the D key before the gray startup screen appears.
After a couple of minutes you are requested to select the language to use and then the AHT console appears.
Press the Test button to run the basic tests.
To perform more detailed diagnostic tests select the Perform extended testing box before pressing the Test button.
To exit AHT press the Restart or Shut Down button when the tests are completed.