There's nothing more annoying than buying (or building) a new PC and just when you've got it all set up and ready to go, something fails and you have to send it back for repair (or take it back to the lab). I can tell you from experience that this is a real pain in the rear!
To prevent this sort of headache, I always recommend giving new systems a thorough stress-test to shake out the bugs before you spend too much time on the system. Yes, it takes some time and effort, but it is well worth it in the long run as you can usually identify (or even push over the edge) components that were likely to give you problems in the short to medium term.
Note: Most of these tests apply to Windows-based systems only ... sorry!
I'm going to cover how to stress-test a number of components, so it's going to be an exhaustive test. Given that you might not want to spend too long on testing a system, I'm going to label some component testing critical and others optional. I suggest that you carry out testing on all the critical components.
Let's kick off by testing the CPU!
Stress-testing the CPU (Critical)
The best and easiest tool to use for this job is Prime95. While the main purpose of this tool is to seek out new prime numbers, but it can also do an awesome job of stress testing any system it is run on. Not only will this test the CPU, but also the cooler and also RAM. Oh, and it's also free.
This tool is easy to use - just download, unpack, run the executable you're ready to go. I suggest choosing the 'Blend' test and running it for several hours (overnight is preferable).
An awesome test for hammering at the GPU is Furmark (free). However, be careful when running this test in 'Burn-in' or 'Xtreme Burn-in' mode as it will cause the temperature of your GPU to spike rapidly and I have known this test destroy graphics cards! YOU HAVE BEEN WARNED!