In classes where I knew the subject well, I generally did well on the tests. In classes where I had gaps in my understanding, I usually did poorly. In classes where the grades were posted publicly, my general subjective judgment of how well people knew the material matched up with their scores. Not perfectly, obviously, but the correlation has been high enough that I’ve never really been convinced that testing in general is “missing” some critical element of learning.