To see if you have a Bartholin's gland cyst, your doctor will do a physical exam and also likely take a sample of your vaginal discharge and look at it under a microscope. This will show if you have an STI.
If you’re under 40, she may do a biopsy (sample of tissue from the cyst) to rule out vulvar cancer. That’s a disease that affects the lips that surround your vagina.