I fainted the first time I got blood taken. I still get queasy around needles but I don't faint anymore. Make sure you're really hydrated and have eaten within a few hours of the test (if fasting isn't required). Either way, tell the nurse/doctor that you don't like needles and request if you can maybe lie down while they're doing it. And whatever you do, don't look at the needle. After it's done stay seated for several minutes if you feel a little queasy. Drinking water can help as well afterward.
I had to get several tests done a few years ago and this worked for me. Good luck! I'm sure you'll be okay.