Charging issues help please.

First off i get frustrated fast. What i did today was take the alt to the local shop and had them spin it. It was fine. The parts store i like had a new regulator on the shelf i got it home and used a diode tester to check it out, mine was bad. Installed new one and yes made sure the new one had a proper ground. I also grounded the alternator on the tab provided. All the issues are gone, its charging fine. and no longer shooting sparks off the mounting bracket. Thank you for the reply NM9