An electrocardiogram, or ECG, is a test that is used to assess the heart. More specifically, an ECG records the transmission of an electrical impulse through the heart. This test is not painful and is typically performed as an outpatient procedure. Analyzing the electrical impulses produced as the heart beats can help identify a number of different abnormalities within the heart.