easiest way to test for "ground loop" problems woud be test some headphones, battery powered speakers, or like Templinocturnus already pointed out, hook up an ipod or something. anything not plugged in to the wall.
to test for improper case grounding, and stuff like that, you need a meter, to test for any potential voltages from the case ground to the wall ground. which means sticking probes around AC plug items. which comes with disclaimers of being dangerous, if you dont know what your doing. Or being dangerous when you do know what your doing even
and most dangerous when you know just enough to be dangerous
like me.
again Templinocturnus already pointed out removing the motherboard fron the case, if there was any incorrect connections occuring there. standoffs hitting , contact locations with the board and metal. Then there is if anything ever got dropped in there, a hunk of metal is where it shouldnt be, some highly conductive thermal goop on your hands that got smeared on the board. and hundreds of other things.
If the board has to go Out, it is easy to check for some things on the way out.
if you just get a real sound card, you could just disable the onboard. a few years ago, the onboards werent even worth having, so the old school method would be to immediatly replace the onboard. but nowdays they are usually fully usable sound devices.
.