When a cancer of the liver is suspected, a liver biopsy is done to piece of tissue from the liver for examination in the laboratory. Specialized x-rays such as CT scans can help define the extent of the cancer in the liver. Liver function tests measure the function of the liver and help define the effect of the cancer or the liver.