An esophagram, also known as a barium swallow test, is a diagnostic imaging procedure used to examine the esophagus. It involves the ingestion of a contrast material, usually barium sulfate, which coats the lining of the esophagus, allowing for clear visualization under X-ray.