You will have to exercise until you reach 85% of your max heart rate which is calculated as (220-age)*.85. For example, if you are 50 you need to hit 85% of 170 BPM. If you are out of shape you will hit that number fairly quickly, within a few mins, you should not have to run.
The stress test will be monitored for heart rate and blood pressure by a tech and a doctor will be on site. I had a treadmill stress test and the pace and elevation of the track was gradually increased. If and when you have any discomfort or the monitor indicates unacceptable parameters the test will be discontinued. I never got to any running phase with my stress test. The test was discontinued after 7 minutes...normally the test may go as long as 15 minutes or so when there isn't any problem..