A urinalysis is a simple and painless test that examines your urine. A urinalysis is used to look at small samples of your urine to detect and manage a large number of disorders. You may need to have a urinalysis if you have suspected kidney problems, infections or pain when urinating. A urinalysis is able to check, diagnose and monitor conditions such as early stages of diabetes, liver and kidney disease.