Xanax will appear on most drug tests. If you have a prescription, you can provide it and the positive result should be excused. If you do not have a presciption, you will almost certainly fail the test.
This all depends on the type of drug test and the length of time elapsed between taking it and being tested. It is possible to test for Xanax. Xanax passes through the body relatively quickly.
Xanax is a prescription drug, so even if it shows up in your drug test, as long as you have a valid prescription from a doctor, you should be just fine.