The trick is, to work in a recruiting context, you also want those tests to be standardized and repeatable. A lot of companies fall down on this. They have candidates do "real work", often in a pair-programming context. There a bunch of problems with this:
(1) "Real work" usually isn't standardizable, so you can't compare candidates
(2) Signal quality from the test is intensely dependent on who is doing the work with the candidate
(3) Two different candidates might end up getting "tests" that are wildly different in terms of predictive power
I have a bunch of ideas for pure software development work-sample tests, but I'm not ready to share them. The idea is simple, though:
* It's a realistic exercise that approximates actual day-to-day work as much as possible
* Every candidate gets the same exercises
* The exercises have objective (preferably gradable) outcomes