An electrocardiogram is a medical test used to measure the heart's electrical activity. The procedure usually involves the application of electrodes, or stickers, to the chest area. ECGs can measure for a range of heart problems, such as arrhythmia or coronary artery disease.