But the court battle pitting work-site safety against individual privacy rights isn't over.
Earlier this month, the Communications, Energy and Paperworkers union Local 707 won an injunction against a testing policy that was implemented during the summer. A judge ordered the matter be settled through arbitration.
An Alberta Court of Appeal judge ruled Tuesday against a Suncor (TSX:SU) application for a stay of the injunction. Suncor said it will continue the fight to keep its work sites safe.
"We will honour the interim injunction, but because of the importance of this program in addressing pressing safety concerns associated with alcohol and drugs, we are appealing the decision," Suncor spokeswoman Sneh Seepal said from Calgary.
"We are committed to moving forward with our plans to implement a random testing program."
Suncor, which had hoped to start testing union workers in safety-sensitive jobs earlier this month, is to make its case against the injunction as a whole on Nov. 28 before a full panel of three Appeal Court judges.
Roland LeFort, president of the 3,400-member union local, was gratified by the court ruling.
The union has no problem with testing employees when there is an accident or if someone is obviously impaired, but random testing is an affront to basic human rights, he said.
Police don't give drivers breathalyzers without probable cause, and Suncor's union employees deserve the same consideration when they are on the job, he added.
"It is the rights of privacy and dignity. We just can't abolish those," LeFort said from Fort McMurray. "Those are entrenched in law and they shouldn't be any different in the workplace than they are in society."
The oilsands giant said it began randomly picking non-union workers in jobs where safety is particularly important for urinalysis tests on Oct. 15. Seepal said those eligible to be tested include managers and executives.
Suncor said three of seven deaths at its oilsands operations near Fort McMurray since 2000 involved workers under the influence of drugs or alcohol.
The company can already test job applicants and people suspected of being impaired for drugs and alcohol. Suncor also offers counselling programs to help employees with substance abuse programs.
"Drug and alcohol use is an issue that affects the safety of our people and our workplace and it really poses an unacceptable risk on our work site," Seepal said.
"The driver behind this program is to do what we can to make sure our folks go home at the end of their shifts."
An arbitrator has been appointed to adjudicate the dispute, but no date has been set for a hearing.
A similar case involving the same union and Irving Pulp and Paper Ltd. in New Brunswick is to go before the Supreme Court of Canada on Dec. 7.
The union has filed a grievance against a policy brought in by Irving in 2006 which said mill employees in "safety-sensitive" positions could randomly be required to take a breathalyzer.
The majority of an arbitration panel ruled that the company neither failed to establish a need for the policy nor demonstrated that mill operations posed a sufficient risk that outweighed an employee's right to privacy.
The Court of Queen's Bench in New Brunswick quashed the arbitration ruling and the province's Court of Appeal dismissed the union's challenge.
The high court's ruling in the case is expected to be watched closely by employers across Canada.
Also on HuffPost