Saliva-based testing works by collecting a sample of saliva, typically using a swab or absorbent pad placed in the mouth. The sample is then analyzed using techniques such as immunoassay or chromatography. These techniques are capable of identifying and quantifying a wide range of substances, including prescription medications, illicit drugs, and alcohol.