I've only ever been tested either during the interview process or on my first day. I've gotten the range of tests at different jobs, urine, saliva, and hair (from the leg in this case).

There are a lot of places that claim to have random testing, but so far, the only "random" is when they already suspect someone is heavily using drugs enough to interfere with their job.

I can't think of a place I've worked at or any of my friends have worked at that hasn't tested. They just don't test again after that first time.