Although not all peptic ulcers are caused by bacteria, it's getting more common to do a test for Helicobacter pyloritest for Helicobacter pylori whenever someone has ulcer
symptoms. This includes testing your blood, breath, stool, or a sample of tissue from your digestive tract (biopsy).
Fecal occult blood test (FOBT). This test may be done to detect
blood in the stool, which may be caused by a peptic ulcer or another serious
problem, such as colon cancer. By itself, an FOBT cannot diagnose peptic ulcer
disease, but it may show if an ulcer is bleeding.