The stress test is usually done fasting so you don't intervere with your natural blood pressure. If you are concerned about the viablity of the pregnancy consult your OB and ask about the stress test procedure.
You should refrain from drinking till after the test if that is what the doctor told you to do. Make sure you drink lots of water tonight and have water available for immediately following the test. If you are concerned about not getting enough liquid you should discuss it with your doctors office.
It is not a good idea to eat or drink prior to your stress test. The reason is that the technician doesn't want you to feel nausea or cramp during the test. You can not drink until after the test. A short while shouldn't matter.