How do I ask??

when I'm going to have sex with a new person and maybe it's not so serious, how do I ask if they've been tested??? many guys will reject the idea or I get really really nervous to ask.

when is it right? how do I ask? where do I ask? helpppp.