There are tests that can diagnose sexually transmitted diseases or infections. Some STIs are caused by bacteria, others by a virus. Screening for bacterial STIs is fairly simple and generally involves collecting a sample of fluid from the infected area. Some viral STIs are screened by drawing blood samples. Other viral STIs, such as herpes and genital warts, are often diagnosed by visual identification of a lesion.
Sometimes health care providers scrape the surface with a cotton swab or take a small biopsy. Some STIs, such as HIV, herpes, and syphilis, can be identified by blood tests. After being screened for an STI, it takes a few days or even a couple of weeks to get test results, since the or clinic often needs to send the sample for analysis.
Below are some general notes - your doctor will discuss specific tests in detail with you!