Xanax belongs to group of medicines called benzodiazepine. So, this drug can be tested for benzodiazepine not for barbiturates. Xanax can be tested in blood for -48 hours after use, in urine for 7 days if used under prescription and for 90 days in hair follicles. In case of chronic use, it can stay in the system for one to one and a half month.