Endoscopy is a minimally invasive procedure that can diagnose a stomach ulcer. A long, thin tube with a camera on the end is placed down your throat and into your stomach. If needed, treatment is also ...