How to test alternator

At low RPM's(idling in drive), my stereo shuts off because it doens't have enough power. It doesn't do it all the time..but does it enough to be annoying. Also when the car is in park, and i open the door, which turns on the dome light, the stereo wil shut off.. Also when the car is off, and i turn a blinker on, the stereo will shut off..

So i'm thinking that I either have a bad battery, or an alternator thats going out.. How do i test the alternator? i'm thinking I am going to go to the local auto parts store tomorrow and have them test the battery