During a stress test, a healthcare provider monitors the heart while the patient exercises on a treadmill or stationary bike.