Electrocardiogram: This test records the electrical activity of the heart through electrodes attached to the person's skin. Impulses are recorded as waves and displayed on a monitor or printed on paper. This test helps diagnose heart rhythm problems and damage to a person's heart from a heart attack.