A test that measures electrical activity in the heart while the patient is exposed to stress or stimuli.