UTIs can be found by analyzing a urine sample. The urine is examined under a microscope for bacteria or white blood cells, which are signs of infection. Your health care provider may also take a urine culture. This test examines urine to detect and identify bacteria and yeast, which may be causing a UTI.