Advice

I had sex the 19 23 and again this month 6-7 with a condom when going in the guy took the condom and force himself in. How long after can I get tested for stds. Will it be too soon for the 6-7. Will the medicine work for the 6-7 if I do. I made a appointment for tomorrow Mind you this was my fwb but he push it was too far but forcing himself with out a condom. I’ve been super anxious about the whole situation. I don’t understand why he put the condom on and take it off during sex.