An EGD test is used to diagnose conditions affecting the upper digestive tract, including acid reflux, ulcers, esophagitis, gastritis, and abnormal growths. It helps detect inflammation, bleeding, infections, or other abnormalities that may be causing digestive discomfort.