A person may be asked to avoid eating or drinking for nearly 8 to 12 hours prior to the liver function test. They should inform the doctor about any medications they are taking, as some may interfere with the test results. If possible, avoid alcohol for 24 hours or one day before the test.