Personally, I use Smart Utility, which relies on the S.M.A.R.T. features built into many/most modern drives. Their website is here and they offer a trial download.
Historically, hard drives worked right up to the point where they stop, usually without much warning. Internally though, the drive likely started having difficulties before it failed to give back requested data to the OS, where the error finally got reported.
This software allows you to manually test your drives, but what I like is it can also monitor them and report internal, correctable problems (things like CRC errors, bad sector remapping, etc.) often before they results in permanent data loss...