The Alberta Court of Appeal turned down the request in a split decision Wednesday after hearing arguments from the oilsands giant.
The ruling means that no testing can take place before the matter is considered by a labour arbitration board. The hearing is scheduled to start on Dec. 10.
Suncor announced in June that it would start the random tests on Oct. 15, 2012.
But that was halted on Oct. 12 after Alberta Court of Queen's Bench Justice Eric Macklin granted a temporary injunction that was requested by the Communications, Energy and Paperworkers Union over concerns about worker privacy.
Suncor asked that the injunction be overturned so the testing program can go ahead. Lawyers told the court that there have been 100 incidents involving drug and alcohol use on the Suncor worksite over the past two years. .
They argue that the tests should be allowed in the interest of safety. There have also been three deaths linked to employee drug and alcohol use since 2000.
But lawyers for the union called the testing an intrusion on the privacy of workers because they have to submit their bodily fluids.
"The union believes that the random testing is asking people who are otherwise innocent, who have never given the employer any reason to believe that they have come to work impaired, to be subject to these tests, is unreasonable," said CEP lawyer Ritu Khullar.
Lawyers for Suncor declined comment.