An esophagogastroduodenoscopy (EGD) test is performed to examine the lining of your esophagus. The esophagus is the muscular tube that connects your throat to your stomach and the duodenum-the upper part of the small intestine.An EGD test is administered by passing a small camera on a tube (called an endoscope) down the throat and along the length of your esophagus.our doctor may recommend an EGD test if you have certain symptoms that are not responding to treatment. These symptoms include: 1  severe chronic heartburn. 2  vomiting blood. 3  black or tarry stools. 4  regurgitating food. 5  pain in the upper abdomen. 6  unexplained anemia. 7  persistent nausea or vomiting.