The procedure varies depending on the type of test being performed. For instance, during a mammogram, an X-ray of the breast is taken to look for any abnormalities. In a colonoscopy, a doctor uses a flexible tube with a camera to examine the interior of the colon. These tests are usually quick and minimally invasive.