To diagnose a vaginal infection, a healthcare provider may perform a pelvic examination, take a sample of the vaginal discharge for laboratory testing, or order additional tests such as a urine test or a Pap smear to rule out other conditions or identify the specific cause of the infection.