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.The actual test takes only around 15 minutes. You may have an exercise stress test in which you walk on a treadmill or pedal a stationary bicycle. If you aren't able to exercise, you'll receive a drug through an IV that mimics exercise by increasing blood flow to your heart.The actual test takes only around 15 minutes. You may have an exercise stress test in which you walk on a treadmill or pedal a stationary bicycle. If you aren't able to exercise, you'll receive a drug through an IV that mimics exercise by increasing blood flow to your heart