In many cases, doctors can make a diagnosis of a functional gastrointestinal disorder after a careful history and examination. Often, however, there is a structural disease that must be excluded by tests that probe the gastrointestinal tract. This fact sheet reviews preparation for common tests, including sigmoidoscopy, colonoscopy, and upper gastrointestinal endoscopy.