Do you want to stress test or benchmark?
X264 stress test is a good stressing tool. Intel Burn Test (it will get HOT) is great for testing max temperature at unrealistic load levels.
Memtest86 is a great memory testing tool and can be booted from a USB drive.
Good performance benchmarks are Fritz, Cinebench, Furmark, 3dmark, etc. Look at some CPU and GPU reviews and see what benchmarks they use. Toms has plenty of articles with benchmark information.
I would stress the CPU with X264 for 4 hours and then run 10 passes of Intel Burn Test (watch the temps, dont let them go over 85*C if using an intel cpu). IBT will give the max temperature that system will put out, no game or program will put out that much heat. If overclocking, you will want to do much more testing (12-24 hours of x264 for example). I would run memtest86 overnight (or 1 to 4 passes) before and after overclocking. Most of it is preference, do what you are comfortable with.