There is nothing special you need to do before an echocardiogram, but it is best not to eat or drink anything with caffeine at least 24 hours before. It is also best not to smoke on the day of the test. If you are having a transesophageal echocardiogram your doctor may advise you not to eat several hours before the test.