Opioid analgesic misuse has risen significantly over the past two decades, and these drugs now represent the most commonly abused class of prescription medications. They are a major cause of poisoning deaths in the USA exceeding heroin and cocaine. Laboratory testing plays a role in the detection of opioid misuse and the evaluation of patients with opioid intoxication. Laboratories use both immunoassay and chromatographic methods (e.g., liquid chromatography with mass spectrometry detection), often in combination, to yield high detection sensitivity and drug specificity. Testing methods for opioids originated in the workplace-testing arena and focused on detection of illicit heroin use. Analysis for a wide range of opioids is now required in the context of the prescription opioid epidemic. Testing methods have also been primarily based upon urine screening; however, methods for analyzing alternative samples such as saliva, sweat, and hair are available. Application of testing to monitor prescription opioid drug therapy is an increasingly important use of drug testing, and this area of testing introduces new interpretative challenges. In particular, drug metabolism may transform one clinically available opioid into another. The sensitivity of testing methods also varies considerably across the spectrum of opioid drugs. An understanding of opioid metabolism and method sensitivity towards different opioid drugs is therefore essential to effective use of these tests. Improved testing algorithms and more research into the effective use of drug testing in the clinical setting, particularly in pain medicine and substance abuse, are needed.