With a few things... Your doctor should take a full history and complete a physical exam. Other tests that prove helpful include a urinalysis, urine culture, measurement of post void residual, and sometimes a voiding diary. Other tests include imaging, cystoscopy, and urodynamics to counsel you best about the cause, treatment options, and prognosis for your urinary incontinence.
Interview. Then exam, if substantial and no response to initial management (diet and kegels) then urodynamic testing and surgery may be done.