Hell, you could set up an old Atari with Frogger in it, and require employees to score X points before clocking in. It might not have a very strong correlation, but it sure would be cheaper and more goal-specific than drug testing.
It would more likely take the form of "watch this simulated surveillance video of the work floor, and press the space bar to stop the machinery on the entire production line". When someone steps over the warning tape on the floor around the person-shredder, you press the button. If someone gets their sleeve stuck in the dude-grinder, you press the button. If the part-spewer starts stamping out misaligned doohickeys, you press the button. If your response time is too slow, you aren't fit to clock in for today's shift. Or it could be a simulation of operating the actual machine that employee uses, attempting to predict their productivity for the day.
It has the added benefit of sneaking safety training videos into the daily workflow.