Although eating or drinking before the test is okay, you need to avoid consuming anything that may contain caffeine before the EKG. Caffeine has been shown to affect the results of your EKG.