I underwent cognitive testing for ADHD,and it was more rigorous a process than I expected.
They administered a battery of tests, among them a few controls to screen for malingerers. Each was narrow enough of a task to believably evaluate a specific aspect of cognitive ability.
The results were evaluated against the broader population of people with similar levels of intelligence
So, for example, in one test, the task is to sum a continuing stream of spoken digits. Apparently, the test includes a distribution of other' performance,and that distribution defines 'normal.' performing worse than the mean (or whatever measure) is therefore abnormal and, potentially, indicative of some disorder or another.
Tl;Dr they use ostensibly reliable statistical methods to define 'normal'