An ECG, or electrocardiogram, is a non- invasive test that records the electrical activity of the heart to help diagnose heart conditions.