Testing a urine sample can help doctors find out what's going on when someone has an infection or other problem in kidneys, bladder, or other parts of the urinary tract. Urine tests are requested when they think a child has a urinary tract infection (UTI).