I worked for a UK AOC company 25 years ago which had a random drug and alcohol testing programme then for all of its staff including pilots, engineers and Ops staff.
A tester would show up un-announced and say "You, you, you and you" and that was it - you had to give a breath and urine sample.
There was a lot of harrumphing amongst the ground staff because there were hardly ever any pilots tested because there were rarely ever any there when the tester showed up as they were all off flying - this was eventually addressed to some extent (Although the testers moaned about having to turn out at 05:30 to get them before the flypro started)