A stress test is used to gain more information about how your heart functions during exercise. Your physician will monitor your heartbeat and blood flow as you walk on a treadmill, and will then be able to diagnose any problems as well as plan treatment.