Diagnosis typically involves a combination of medical history, physical examination, and laboratory tests. A healthcare provider may take a sample of vaginal discharge or urine to identify the specific bacteria causing the infection. Advanced diagnostic tools like PCR (Polymerase Chain Reaction) tests can provide more accurate results.