In my opinion, the problem with exams is that they are very subjective. When the teacher is checking it, he/she doesn`t consider your feeling or your health at the moment you took it. It is very difficult to take an exam when you have problems at home or you are sick. Have you ever taken an exam having a running nose or a headache, for example? or when a relative is ill?. I know that If you are facing that kind of situations, you can talk to the teacher and explain it to him/her, but some of them simply don´t care and force you to take it, even though you are not in your prime.
Also, the marks you can get depend on the point of view of the teacher, because sometimes you have to answer what he/she WANTS and not what you have learnt. To make my point clear, I have known cases where you learnt a different way to resolve a problem (a mathematic problem, to be specific)and, despite you have the same result of the teacher, he/she put that answer wrong, only because you don´t use the method he/she has taught you. Besides, Sometimes, teachers are not bias when they are checking the exams. You can find this situations when they are a student´s friend or, in some way, they are related. Do you think a teacher will put a bad mark to his/her own son? or what about his/her niece or godchildren? Or his neighbor?
On the other hand, exams are the only test method I know where teachers have completely control over the students. If teachers give them assignments (homeworks or papers, for example), the odds they will cheat are very high, considering that students have a lot of tools to do that nowadays. (internet for example.
To answer the question, Exams are not a waste of time if teachers apply them fairly.....