There are usually a few few different ways to test for PCOS.
usually the doctor will first ask you about your symptoms ie, irregular periods, excess hair and things like that.
Some doctors will want to do an ultrasound to check for cysts on the ovaries but just because you do or do not have cysts doesn't necessarily mean you have PCOS.
Most doctors will perform a blood test to check hormone levels which can also give them a good idea of weather you have PCOS or not.