Teaching to the test is malpractice
"For every complex problem, there is an answer that is clear, simple - and wrong."
H.L Mencken
Testing is not teaching.
If you want proof of why, you need not look any further than this:
Learning is messy. Real learning is really messy. Testing is, if nothing else, orderly. See the problem?
Talk to any test-maker or psychometrician, and they'll tell you the tests were never devised to make large sweeping, all-encompassing inferences. Even those who speak in favor of using test scores in moderation in low-stakes contexts understand that tests are merely a small sample of a much larger domain that we want to know about, and that great caution must be made in making inferences based on these tests.
So even if we lived in a fictional world where test scores were valid, reliable and objective enough to make sweeping inferences about student achievement, we would have to still admit that the tests can't measure everything.
In their book, The Myths of Standardized Tests, Phillip Harris, Bruce Smith and Joan Harris aptly describe the danger of teaching to any test:
You'll often hear someone say that a good test is one that teachers should be