An electrocardiogram (ECG) is a medical test that detects heart problems by measuring the electrical activity generated by the heart as it contracts.
They may also recommend an ECG if a person is experiencing symptoms such as:
- chest pain
- shortness of breath
- fainting, or
- fast or irregular heartbeats (palpitations).