An exercise stress test is used to determine how well your heart responds during times when it’s working its hardest. During the test, you’ll be asked to exercise — typically on a treadmill — while you’re hooked up to an electrocardiogram (EKG) machine. This allows your doctor to monitor your heart rate.