I have not heard of HIV passing this way.
HIV does not live for long when it is outside of the body.
I don’t know your full history but if this is your only concern in regard to HIV, I would say there is no need to do a HIV test for this incident.
Have a look at our “Know your chances” web page, it provides information on your chances of getting or passing an STI depending on how you are having sex.
Have a look at our HIV web page for more information on HIV.
Please leave a comment to let us know if this answers your question or if you need more information.
For other readers, please feel free to leave a comment, or let us know if this was helpful.