"Teaching the test" doesn't teach writing - it simply teaches how to pick the right multiple choice answer. "Teaching the test" means going over information related to a particular test and only teaching the answers to questions that you believe will be found on that particular test. In most cases, "teaching the test" means no real writing skills are taught.
Most of the students you are teaching in have probably "passed" all the "tests" they were given in school - and yet their writing skills are dismal. So are their reasoning and mathematical skills - these are skills that are learned through intensive exposure to information, not through "this answer equals this question". A true understanding of base ten cannot be replaced by answers simply memorized and regurgitated back to a teacher, and true writing cannot be learned by picking the letter "d" on a multiple choice test.
You and I are on the same page; "teaching the test" = no writing, no reading, no 'rithmatic, no reasoning. The sum of "teaching the test" = ZERO education.
It depends on the test. If it includes math problems, then teaching math is teaching the test. It is the task of the test writer to write a good variety of math questions.
Writing is a much more difficult subject to evaluate with multiple guess questions. Math... No problem.
Some time ago, teachers decided that they would teach "reasoning" to primary school students. Memorization of multiplication tables and sentence diagramming were dropped in favor of reasoning exercises. That was a big mistake. Six year old kids aren't ready to do much high level reasoning.
Students now use calculators as a crutch. Unfortunately, they can figure out which numbers to punch into the calculator.
I asked 92 college freshmen in a Financial Accounting class to write down the answer to this question: What is 32 percent of 100. Only 26 students were able to answer correctly. Those students could not possibly have passed any math test, multiple choice or otherwise.