1) Variation in test scores. It's best if the test is difficult enough to produce variation in students scores; i.e., some get high and some get low scores. Otherwise, if students are all bunched up in a narrow distribution, a student making a small mistake could end up with a much lower grade. This principle, taken alone, would argue for tests that range from 0% to 100% right. That's what I tried when I first started teaching, but I soon ran afoul of the second principle.
2) Students must view test as fair. For better or worse, students perceptions of a test will affect their future learning. If they view it as too easy, some will decide to study less for future exams. If too hard, some will become alienated from the class and disengage out of frustration. This requires a test the falls within the bounds of students' definition of appropriate, though this definition is influenced by both the objective difficulty of the exam and the subjective presentation of it.
3) Motivates students to study harder. Most of the test-related learning happens as students prepare for it (rather than taking it). As such, I have started emphasizing tests that require a lot of preparation. I'll post how I do this another time, but this is becoming my main goal. Again, test difficulty comes into play. Too easy, they don't take it seriously. Too difficulty, they don't even try. As I've posted earlier about classwork in general, I aim for students doing lots of modestly difficult work in prepping for a class.
For additional essays on teaching sociology: www.brewright.com/teaching/essays.html