Alrighty guys, because I've already had to remove ten comments similar to this, I'm going to leave a top-level mod post here. Please remember when posting here that this is not /r/Politics. We are not interested in contemporary politics, your opinions on current policies of countries, two word answers, one line answers, etc. For more info on what makes a good answer, please see here. If you're interested in our rules, there's a link in the sidebar for your perusal.
Have a great day :)
Something to keep in mind is practical drug tests didn't exist until the first part of the 20th century. The first drug testing in modern times was probably the Olympics in 1966. And while anti-doping is a fascinating topic, what you are probably asking about is the war on drugs.
1971 - Operation Golden flow, Essentially nixon begins drug testing the military, This is mainly aimed at heroin use and is considered successful.
It starts in the main stream with the Reagan's war on drugs. he start pushing for workplace testing around 1986, his September speech on the crack epidemic mentions the dangers of taxi drivers and other transportation professionals doing drugs. In 1988 he signs the Drug Free Workplace Act. This really laid the ground work for workplace testing, as it put the imperative on the employer to certify that they maintained a drug free workplace if they wanted to keep federal contracts.
This was expanded in 1991 to get OSHA involved with the omnibus transportation act. Which basically put anyone in a transportation job that required operating heavy machines like trains, trucks, planes to be tested as well.
The last little bit of legislative history is the states began passing laws that allowed companies that had drug free workplace policies to discounts on the workers compensation insurance they were required to have.
I'd have to break the 20 year rule to really discuss state legislation in depth.
One thing that is interesting is the requirements of a "Drug free workplace policy" differ, The federal acts are more stringent, whereas the state ones often only require something the along the lines of offering treatment programs and testing when there is an accident. Many HR departments will lead towards a more safe than sorry attitude.
TL;DR: sometime between 1988-1996 depending on what state you are in.