While Xanax (alprazolam) and Valium (diazepam) are different drugs, they belong to the same drug class. Drug tests cannot tell the difference between these two drugs.
Tests will simply flag both as benzodiazepines, but Xanax stays in your system for a significantly shorter period of time than Valium.