Esophagogastroduodenoscopy EGD is a test to examine the lining of the esophagus, stomach, and first part of the small intestine.