Last October, the Communications, Energy and Paperworkers union won an injunction against the testing and a judge ordered the matter be settled by arbitration.
Suncor) took the matter to the Alberta Court of Appeal, where two of three judges on a panel agreed to dismiss the case on Wednesday.
Justice Jean Cote spoke for the majority opinion and called Suncor’s plans for drug testing "a significant breach of worker’s rights" while upholding an injunction that will prohibit the company from testing employees without cause.
The union had argued random testing is an affront to basic human rights, and the Alberta Federation of Labour called the court decision a victory.
“Employers like drug testing programs because they give the impression that something decisive is being done about safety,” Federation president Gil McGowan said in a news release.
“But these programs don’t improve safety. Employers know that, so it’s little more than very expensive public relations.”
Suncor spokeswoman Sneh Seetal said Wednesday night that the oilsands giant is disappointed in the court's ruling.
"We know alcohol and drugs are a pressing safety concern at our Wood Buffalo sites and we will present evidence to support this during the arbitration process."
She said three of the seven workers who died while on the job at Suncor's site since 2000 were under the influence of alcohol or drugs at the time.
"Our view is one fatality is too many."
She said it is too early to say if Suncor will appeal the decision to the Supreme Court.
Suncor is obligated to provide a safe work site for all of their employees, contractors and visitors and the company is doing what it feels is necessary to fulfil that commitment, Seetal said.
"Random testing is one component of an already comprehensive program that includes other testing, training, educational initiatives and support for those who need assistance. The goal of that program is to make sure our folks go home safely at the end of their shifts."
The union has agreed to certain types of drug testing in its collective agreement, including pre-employment screening and with-cause drug testing, and says there is no evidence that random drug testing makes workplaces safer.
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.
Also on HuffPost