Many oilsands companies have voluntary testing. Employees are also tested if there is a strong suspicion they are high or intoxicated on the job or if they are involved in a workplace accident.
The Communications, Energy and Paperworkers Union is not happy with the project. Union president Dave Coles said that random drug tests are humiliating, violate workers privacy and don't improve workplace safety.
The union prefers companies invest in programs to reduce the impact of substance abuse.
Pat Atkins, the administrator of the Drug and Alcohol Risk Reduction Pilot Project (DARRPP), says no one is trying to invade employees' privacy.
"Our concern is safety and it's also deterring people from coming to work in an unfit condition and we also want people to get help," she said.
"This is not about catching people. This is about trying to prevent people from causing incidents that harm themselves or other people."
Suncor, Total and Canadian Natural Resources are the companies taking part in the initiative. Testing is expected to start later this year.
Also on HuffPost