The results of urine tests can be affected by diet, dehydration, medicines, exercise, and other factors. Sometimes, you will be asked to come back and give another sample. Many people are familiar with pregnancy tests that use urine to detect a substance that only pregnant women produce.