When there's a blockage somewhere in one of your coronary arteries, the vessel distal (after the blockage) receives less blood flow (because of the proximal blockage). To compensate for the this impaired blood flow, the part of the vessel after/distal to the blockage will dilate to decrease resistance (blood flow takes the path of the least resistance). This dilation might be just enough to get enough blood flow to the distal part of the vessel when the heart is beating at baseline (not during exertion). What happens when you exercise is that there is more oxygen demand everywhere in your body, including your heart, so your coronary arteries dilate to get more blood flow. BUT, the blocked artery can't dilate anymore, because it is already dilated in response to the blood clot. Because of this, less blood will flow to the blocked coronary artery because the normal coronary arteries are now the paths with least resistance (due to vasodilation), hence blood is being "stolen" from the clogged artery and into the normal arteries.
The principle of pharmacologic stress test with coronary dilators is to simulate increased demand (which results in vasodilation). it is used for people who exercise (for whatever reason).
Hope this helps!