Use a DMM and check the voltages, battery, alternator, and on amp terminals. If you see 12.5v or higher during idle then you're fine. If you see it dropping below 12.5v, then step on the gas and see if makes any difference. A faulty alternator will show 12v - 13v randomly. A low battery voltage will also shut down your car at idle. Either way, you'll need DMM to diagnose it.
Use measure the voltage with the engine off, then do it again with engine running. The voltage should read 12v - 12.5v, then 13.8v - 14.2v. If you see that, consistently, then you're okay. If however, you see 12v - 14v up and down, then your alternator needs to be checked out. If you see 12v or lower at idle or with engine off, then your battery needs attention. Either recharge it or replace it.