If you want your doctor to understand the health of your heart as exactly as possible, then you simply must NOT take any unrecorded medication before any test. That's it in a nutshell. The heart has to be tested 'naked', so to speak, unless the doctor tells you otherwise.
If you are nervous, tell your doctor about your problem well before the test, and *ask* if it's OK to take anything.