Testing is a tool. A tool all too often misused because the results get confused with reality. But used correctly, student testing is very helpful.
For instance, would you begin teaching all kids about fractions? Most likely you'd want to know what they know already. If they can't count, might need to back up a bit. If they've mastered fractions, then skip it.
My wife uses all sorts of testing. Standardized testing, open response, pre-testing, journaling, etc. She uses it to craft what she is going to teach and how. Given that she has them set fires, build Rube Goldberg contraptions, and debate the history of genetic research, it would be hard to say she's teaching to the test. She uses testing as an input, not an output.
Car analogy: It's like checking the speedometer, listening to the engine, checking your mirrors, and scanning the road. Not because those are your goals. To know when to hit the gas or brakes, and when to swerve. To reach your goal of getting where you want to go. And sometimes going offroad works best.