One of the most interesting facts about drug testing is that detection times vary depending on the type of drug. Some drugs, such as cannabinoids from marijuana, are detectable up to 60 days, while others, such as amphetamines, become undetectable in a matter of days.
False positives are also an interesting aspect of drug testing. Certain over-the-counter or legal prescription medicines can cause false positives, along with some food and other unregulated substances. Perhaps the most famous example is poppy seeds causing a false positive for opiates.
Drug tests also include tests to ensure the sample was not tampered with to create a false negative. Many drug-testing facilities add blue dye to the water in their toilets to provide a visual clue. They also test for creatinine levels. If those levels are too low, it may indicate that the person being tested diluted the urine sample with water. Some people also attempt to affect results by adding enzymes or other additives to the urine, but that changes the pH which is also routinely tested.
Urine tests are the most common method of testing, but they test the level of metabolites in the urine, which does not necessarily indicate recent use or current intoxication. Blood tests are more accurate but less-frequently used.