Tests that don't relate to qualifications for the job are de facto illegal. If the job is for a machinist, and you are asked to show how to use a micrometer, that's probably ok*.
I am of the opinion that pretty much ALL questions, other than subject matter ones, are not predictive and therefore illegal. For example, I'm an engineer and I work at a job (math modeling) in a situation not ideal for extroverts (home office, suburbs, no one else at home during the day). I do ok. But if someone gave me a test, they'd probably say I'm not temperamentally suited to this situation. The thing is, there may be useful psychological questions, but in a room full of "N" psychologists, you will get "N+1" opinions as to what tests are best, which are predictive, etc. etc. A former boss was skeptical about the Meyers-Briggs Personality tests and did some investigation. He actually came to believe that this test was useful (he actually became a Meyers-Briggs instructor). A friend who recently got her PhD in Psychology tells me that most folks in academia doubt that Meyer-Briggs has much merit. If "A" says that the testing method of "B" is no good, and "B" says the method of "C" is no good, and so forth so that "Z" says that the method of "A" is no good, I tend to agree with A through Z: all their methods are probably worthless, or at least indefensible.
The logical inference here is that any HR group administering a non-subject matter test is probably putting their company at severe legal risk.
I mean, the questions these guys ask are laughable: "Have you ever stolen anything?". ("Hmm, yes. I'm disqualified? For stealing my little brother's dessert when I was 6? Really? That relates to the job?")
Companies with lackluster unimaginative managment want clear decision rules that can be administered by idiots. And then complain when the process weeds out high-quality, innovative thinkers.
Sorry for the rant, gang.
Jim