Electrocardiography (EKG) is a quick and painless test used to look for problems with your heart’s electrical activity. During this test, your doctor will attach several sticky patches called electrodes onto your arms, legs and chest. You’ll lie very still and breathe normally while the device records your heart’s electrical activity. The test can take up to 10 minutes to complete.