A urine test is usually the first step for diagnosing a UTI, and the urine will be analyzed for bacteria and white blood cells. If the urine tests positive for a UTI and symptoms persist after treatment, imaging tests can determine other potential issues in the urinary tract.