Urine tests can still pick up diabetes. However, sugar levels need to be quite high (and diabetes more advanced) to be detected on a urine test, so this is not the test of choice for type 2 diabetes.
Almost all diabetes tests are now conducted on blood samples, which are collected in a visit to your physician or obstetrician (if you're pregnant).
Many things can affect blood sugar (such as certain medications, illness, or stress).
A diabetes diagnosis requires more than just one abnormal blood sugar result.