We think of exams as simple troublesome exchanges with students:
Glance at some of the uses of examinations:

Measure students' knowledge of facts, principles, definitions,
experimental methods, etc

Measure students' understanding of the field studied

Show students what they have learnt

Show teacher what students have learnt

Provide students with landmarks in their studies

Provide students with landmarks in their studies and check
their progress

Make comparisons among students, or among teachers,
or among schools

Act as prognostic test to direct students to careers

Act as diagnostic test for placing students in fast
or slow programs

Act as an incentive to encourage study

Encourage study by promoting competition among students

Certify necessary level for later jobs

Certify a general educational background for later jobs

Act as test of general intelligence for jobs

Award's, scholarships, prizes etc.
There is no need to read all that list; I post it only as a warning against trying to do too many different things at once. These many uses are the variables in examining business, and unless we separate the variables, or at least think about separating them, our business will continue to suffer from confusion and damage.
There are two more aspects of great importance well known but seldom mentioned. First the effect of examination on teachers and their teaching –
coercive if imposed from the outside; guiding if adopted sensibly. That is how to change a whole teaching program to new aims and methods – institute new examinations. It can affect a teacher strongly.
It can also be the way to wreck a new program – keep the old exams, or try to correlate students’ progress with success in old exams.
Second: tremendous effect on students.
Examinations tell them our real aims, at least so they believe. If we stress clear understanding and aim at growing knowledge of physics, we may completely sabotage our teaching by a final examination that asks for numbers to be put in memorized formulas. However loud our sermons, however intriguing the experiments, students will be judged by that exam – and so will next years students who hear about it.
From:
Examinations: Powerful Agents for Good or Ill in Teaching  Eric M. Rogers  Am. J. Phys. 37, 954 (1969)
Though here the real power players the bureaucrats and (highly) qualified PhDs in education or otherwise who decide what is to be taught and how it is evaluated in the classroom. They are “coercive” as Rogers points out and teachers, the meek dictators (after Krishna Kumar), are the point of contact with the students and have to face the heat from all the sides. They are more like foot soldiers most of whom have no idea of what they are doing, why they are doing; while generals in their cozy rooms, are planning how to strike the enemy (is the enemy the students or their lack of (interest in ) education, I still wonder). In other words most of them don’t have an birdseyeview of system that they are a focal part of.
Or as Morris Kline puts it:
A couple of years of desperate but fruitless efforts caused Peter to sit back and think. He had projected himself and his own values and he had failed. He was not reaching his students. The liberal arts students saw no value in mathematics. The mathematics majors pursued mathematics because, like Peter, they were pleased to get correct answers to problems. But there was no genuine interest in the subject. Those students who would use mathematics in some profession or career insisted on being shown immediately how the material could be useful to them. A mere assurance that they would need it did not suffice. And so Peter began to wonder whether the subject matter prescribed in the syllabi was really suitable. Perhaps, unintentionally, he was wasting his students’ time.
Peter decided to investigate the value of the material he had been asked to teach. His first recourse was to check with his colleagues, who had taught from five to twentyfive or more years. But they knew no more than Peter about what physical scientists, social scientists, engineers, and high school and elementary school teachers really ought to learn. Like himself, they merely followed syllabi – and no one knew who had written the syllabi.
Peter’s next recourse was to examine the textbooks in the field. Surely professors in other institutions had overcome the problems he faced. His first glance through publishers’ catalogues cheered him. He saw titles such as Mathematics for Liberal Arts, Mathematics for Biologists, Calculus for Social Scientists, and Applied Mathematics for Engineers. He eagerly secured copies. But the texts proved to be a crushing disappointment. Only the authors’ and publishers names seemed to differentiate them. The contents were about the same, whether the authors in their prefaces or the publishers in their advertising literature professed to address liberal arts students, prospective engineers, students of business, or prospective teachers. Motivation and use of the mathematics were entirely ignored. It was evident that these authors had no idea of what anyone did with mathematics.
From: A Critique Of Undergrduate Education. (Commonly Known As: Why The Professor Can’t Teach?)  Morris Kline
Both of the works are about 50 years old, but they still reflect the educational system as of now.