Before a cardiac stress test, avoid eating or drinking anything except water for a few hours, wear comfortable clothes and shoes, and ask your doctor about any medication changes.