An electrocardiogram records the electrical signals in your heart. It's a common test used to detect heart problems and monitor the heart's status in many situations. Electrocardiograms also called ECGs or EKGs â€” are often done in a doctor's office, a clinic or a hospital room. And they've become standard equipment in operating rooms and ambulances. An ECG is a noninvasive, painless test with quick results. During an ECG, sensors (electrodes) that can detect the electrical activity of your heart are attached to your chest and sometimes your limbs. These sensors are usually left on for just a few minutes.