Tests detect illegal drugs, alcohol, and some prescription medications. Specifics vary by test type.