How does it take for a doctor to test for celiac disease and gluten sensitivity?

Depends on the test. And the lab doing the testing. There are a number of lab tests for diagnosing celiac disease. Many labs do not perform the tests in-house but send the specimens to a reference lab. Based on the results of initial testing, additional tests may be needed. Therefore it is not feasible to give an exact timeline, but all of the tests can be completed in a matter of days.