How do doctors test you for dehydration?

Exam. If you examine a patient and ask how often they have peed in the past 24 hrs you will know if they are dehydrated or not. Labwork can help decide if it is a special form of dehydration, but most of the time it doesn't change the overall impression, just the approach to treatment.
See below. Examination of vital signs like pulse which can be high, and low blood pressure, specially BP which falls when you make the patient stand are very good signs of dehydration. Dry mucus membranes and skin are not very specific. Lab tests like blood urea may be high.