I think they tried that in some districts by tying the amount of the bonus to the performance of the children in the class. The teachers were the one administering the tests so some of them gamed the system a bit and cheated on the grading of the test.
It's not a matter of gaming the system. The teacher is the system. Just about anything the kids learn (except for honors classes, where the kids will sometimes learn some things on their own) is due to strenuous effort from the teacher.
All teachers "teach to the test" to some degree. The good ones try to get the kids to use higher-order thinking skills, and their quizzes and tests bear this out. If you want the kids to get better grades though, you could just heavily cover the material that's on the test, then make sure you use exactly the same wording on the test as was on the homeworks and quizzes (as opposed to mixing it up a bit to get the kids to think about things a little more).