Paternity test questions

Is it possible to get a paternity test without the guy knowing? If so, how? No judgements please. I plan on telling him but would rather do this first.