Most pregnant women have a glucose screening test between 24 and 28 weeks of pregnancy. This test checks for gestational diabetes. The test may be done earlier if you have high glucose levels in your urine during your routine prenatal visits or if you have a high risk for diabetes.