Your sexual partner would need to have an STI for them to be able to pass one to you.
What could happen is they have a negative test but end up having an STI (we call this a false negative test). It’s also possible they could have an STI that was not tested for.
The two situations that can come up in regard to testing accuracy are the window period and the quality of the sample. I can give you some example in regard to this. Window period is the time it takes for an STI to show up on a test after it has passed to someone. Say you have a partner who had a previous sex partner and gets a test a couple of days after having sex, in this case their test would be done too soon and most likely would not pick up an STI if one had been passed to them.
Quality of the sample is also another factor, say a test for chlamydia was done but the person had just urinated before doing the test or a swab sample was not taken well enough or from the correct place e.g. a test was taken from the genitals but they actually had the STI in their throat. These examples show how someone can have an STI but a test may have showed a negative result.
The other example is if a test for a certain STI was not done or it’s not possible to do one. For example someone comes into our clinic with no symptoms and gets a routine STI screen. At our clinics a routine screen for someone without symptoms would include gonorrhea, chlamydia, syphilis, HIV and maybe hepatitis (depends on risk and vaccine history). This means that a person could have a common STI like herpes simplex virus (HSV) or human papillomavirus (HPV) and not know it. Currently we have no test available for HPV testing in our clinics. There are HSV blood tests available that can be helpful in certain situations but are not good screening tests so we do not use them for routine STI testing.
Let us know if this does not answer your question or if you have any further questions or concerns.