A gastroenterology test is any diagnostic procedure used to examine your digestive tract, from the esophagus down to the rectum. These tests range from simple stool samples and breath tests you can do with minimal disruption to your day, all the way to sedated procedures where a camera is guided through your digestive system. The specific test your doctor recommends depends on your symptoms, whether that’s persistent heartburn, unexplained abdominal pain, changes in bowel habits, or screening for colorectal cancer.
Endoscopic Procedures
The most common gastroenterology tests involve an endoscope, a thin, flexible tube with a camera and light on the end. These procedures let a doctor see the lining of your digestive organs in real time and, when needed, take small tissue samples for analysis.
An upper endoscopy (sometimes called an EGD) examines your esophagus, stomach, and the first part of your small intestine. You lie on your left side, a small mouth guard is placed between your teeth, and the scope is gently guided down your throat. The whole thing typically takes 15 to 30 minutes. Doctors use it to investigate persistent heartburn, difficulty swallowing, unexplained weight loss, chronic nausea, suspected blood loss from the upper digestive tract, and to monitor precancerous conditions like Barrett’s esophagus.
A colonoscopy examines the full length of your large intestine. It’s one of the most common screening tools for colorectal cancer, and the U.S. Preventive Services Task Force recommends that adults begin screening at age 45, continuing through age 75. For people at average risk with normal results, the test is repeated every 10 years. Beyond screening, colonoscopy can identify inflamed tissue, ulcers, polyps, and sources of bleeding, and a doctor can remove polyps during the same procedure.
A sigmoidoscopy is a shorter version of a colonoscopy that only examines the lower portion of the colon. It uses a smaller, flexible scope inserted through the rectum and inflates the intestine with air for better visibility.
Capsule Endoscopy
Sometimes called the “pill camera,” capsule endoscopy involves swallowing a vitamin-sized capsule that contains a tiny camera. As it travels through your digestive tract, it takes thousands of images that are transmitted to a recorder you wear on a belt. It’s used most often when standard endoscopy and colonoscopy haven’t found the source of gastrointestinal bleeding. It’s also helpful for diagnosing and monitoring Crohn’s disease, evaluating celiac disease, and surveilling for small intestine tumors.
The major limitation is that it can only take pictures. Unlike a standard endoscopy, it can’t take biopsies or treat problems it finds. Battery life is another factor: roughly 16.5% of capsule studies are incomplete because the battery runs out before the capsule exits the digestive tract. For these reasons, capsule endoscopy works best as a complement to other tests rather than a first-line tool.
Biliary and Pancreatic Tests
Two specialized procedures focus on the bile ducts, gallbladder, and pancreas. ERCP (endoscopic retrograde cholangiopancreatography) threads an endoscope down to where the bile and pancreatic ducts empty into the small intestine. It can both diagnose and treat problems like gallstones stuck in the bile duct, blockages, and narrowing. Since the 1960s, it has been the primary minimally invasive approach for these conditions.
Endoscopic ultrasound (EUS) combines an endoscope with an ultrasound probe to produce detailed images of the pancreas, bile ducts, and surrounding tissue. It can also guide a needle to collect tissue samples from masses or lymph nodes. EUS is particularly valuable when jaundice is caused by a suspected tumor, because it can obtain a tissue diagnosis while ERCP addresses the blockage. In patients with suspected gallstones in the common bile duct, EUS is sensitive enough that performing it first avoids an unnecessary ERCP in about 67% of cases where no stones are actually present.
Breath Tests
Breath tests are noninvasive and typically done in a clinic or even at home. You drink a specific solution, then breathe into collection bags at timed intervals. The gases in your breath reveal what’s happening inside your gut.
For small intestinal bacterial overgrowth (SIBO), you drink a glucose-and-water mixture. A rapid rise in exhaled hydrogen or methane indicates that bacteria in the small intestine are fermenting the sugar before it can be absorbed normally. Similar breath tests can diagnose lactose intolerance and other sugar malabsorption issues by measuring the same gases after you drink a lactose solution.
A H. pylori breath test detects the stomach bacteria that cause most ulcers. You swallow a substance containing a special form of carbon, and if H. pylori is present, the bacteria break it down in a way that produces carbon dioxide you breathe out. Breath tests can also help diagnose delayed stomach emptying (gastroparesis) by tracking how quickly a test meal leaves your stomach.
Stool-Based Tests
Stool tests require no sedation, no fasting, and no time off work. They’re collected at home and mailed to a lab.
A fecal immunochemical test (FIT) checks for tiny amounts of blood invisible to the naked eye. It’s one of the approved methods for colorectal cancer screening between colonoscopies. A multitarget stool DNA test (the brand name is Cologuard) goes further by also looking for DNA markers shed by abnormal cells. The DNA test has higher sensitivity for detecting both advanced precancerous growths and colorectal cancer than FIT alone, though its specificity is somewhat lower, meaning it produces more false positives. A positive result on either test requires a follow-up colonoscopy to confirm or rule out a problem.
Stool cultures check for bacteria, viruses, or parasites causing diarrhea. Other stool analyses can detect markers of intestinal inflammation or signs of pancreatic dysfunction.
Motility and Acid Tests
When the issue isn’t what your digestive tract looks like, but how well it’s working, doctors turn to functional tests.
Esophageal manometry measures the strength and coordination of muscle contractions in your esophagus. A thin tube is passed through your nose and into your esophagus, and you’re asked to swallow sips of water while sensors record the pressure. This test diagnoses conditions like achalasia (where the lower esophageal valve doesn’t relax properly), diffuse esophageal spasm, and weak esophageal contractions. Normal pressure at the lower esophageal valve falls between 8 and 26 mmHg. Results below that range often point to a higher risk of severe acid reflux that may not respond well to medication alone.
pH monitoring measures acid levels in your esophagus over 24 hours. A small sensor is positioned about 5 centimeters above the lower esophageal valve, either on a thin tube through your nose or clipped to the esophageal lining during an endoscopy. It records every reflux episode, how long each lasts, and whether reflux is worse when you’re upright or lying down. These data points are combined into a composite score, and a value above 14.72 is considered abnormal.
Anorectal manometry evaluates the muscles of the rectum and anus, and is commonly used when investigating chronic constipation or fecal incontinence.
Imaging Tests
CT scans produce detailed cross-sectional images of the abdomen and can reveal tumors, abscesses, bowel obstructions, and organ abnormalities. A virtual colonoscopy (CT colonography) uses CT imaging to create a 3D view of the colon without inserting a scope, though it still requires bowel preparation and can’t remove polyps if they’re found.
A colorectal transit study tracks how quickly food moves through your colon. You swallow capsules containing tiny markers visible on X-ray, then have X-rays taken over several days to see where the markers are. This helps diagnose slow-transit constipation.
Preparing for a GI Procedure
Preparation varies by test. Breath tests and stool tests require little beyond following dietary instructions for a day or two. Endoscopic procedures require more planning.
For an upper endoscopy, you typically fast for 6 to 8 hours beforehand. Colonoscopy preparation is more involved: you start a low-fiber diet two days before, switch to clear liquids (water, apple juice, broth, plain gelatin, clear sports drinks) the entire day before, and take a prescribed oral laxative to fully clean out the bowel. You’ll drink half the prep solution the evening before, usually starting around 6 PM, and the remaining half about five hours before your procedure time. Nothing by mouth is allowed in the final two hours. Red and purple liquids or foods are off-limits because they can mimic blood during the exam.
Sedation and Recovery
Most endoscopic procedures use some form of sedation. The two main approaches are moderate sedation (often called “twilight”) and deep sedation.
Moderate sedation combines a sedative with a pain reliever, and the effects last roughly 30 to 80 minutes. You’ll feel drowsy and relaxed, and most people don’t remember the procedure afterward. Deep sedation uses a faster-acting agent that wears off within minutes, offering a virtually painless experience with quicker recovery. Deep sedation has become increasingly popular for GI procedures in North America and Europe precisely because patients wake up faster and feel more alert afterward.
In rare cases involving complex procedures or patients with specific health concerns, full general anesthesia with a breathing tube is used. Some centers also offer unsedated endoscopy, which has the advantage of lower cost, no recovery period, and the ability to drive yourself home or return to work immediately. With any form of sedation, you’ll need someone to drive you home and should plan to take the rest of the day off.

