Thank you for your query at DoctorSpring.com
I am Dr. Jaydeep and I am pleased to assist you.
Since you pulled out immediately, there are very low chances of acquiring STDs and HIV, in particular.
When a condom tears, it is the female who is at additional risk of acquiring HIV, as there can be semen spillage. Since you had a condom on, and you pulled out, when it tore, you should not worry about HIV.
Now, the STD that could be transmitted is herpes or genital herpes ( HSV-2 ) if she had open lesions around her genitalia/ thighs. Even with a condom on, there is always a slight risk of transmitting the infection due to open lesions coming in contact with other parts not covered by a condom.
You can get yourself tested at the end of 10 days. There is very low chance, but just for your satisfaction, you can get the STD panel evaluated. No testing is required for HIV.
Hope this was helpful,