To diagnose a health condition in the gastrointestinal system, a gastroenterologist can perform certain tests, like an endoscopic ultrasound, colonoscopy, liver biopsy, or another test. Most of these tests are only minimally invasive. You'll want to know which test or tests you'll need and what to expect, so you should ask about tests. With a test like an endoscopy, a long, flexible tube is inserted down the patient's throat and into the esophagus, and sometimes a biopsy is performed at the same time. If you need an endoscopy, you might want to ask if you need a biopsy too.