Testing shows that difference. Whatever dealing there is lies beyond the purpose of tests. What to do about 'high blood pressure' is not the purpose of the test.
Yes, children may have it hard if their parents [parent] are not learning role models or have split up. I doubt tests or educators can be of much help. I don't think it would be socially acceptable to put them in different schools for different education. Sort of separate but unequal.
The purpose of testing is flatly stated as being to identify and deal with "failing" schools, and to reward "good" schools.
Which conveniently ignores the fact that the test-fodder (i.e., kids) have different achievement levels for reasons other than what the schools are providing.