Testing for SIBO primarily involves breath tests, endoscopy, and occasionally stool tests. The breath test is the most common and involves you breathing into a device that measures hydrogen and methane levels. These gases are produced by bacterial fermentation in the small intestine. An endoscopy is a more invasive procedure where a tube is inserted through your mouth to collect fluid samples from your small intestine. Stool tests are less commonly used for SIBO but can help rule out other conditions. For a comprehensive guide on diagnostic methods, the Mayo Clinic is a reliable resource.