I just tested for my sho dan on Friday, at summer camp, and I have been told by many people that I had a very good test.
In principle it might be best for the teacher to determine when students are ready to test, but some teachers are not very good at (or interested in) determining their students' progress. Other teachers only notice certain of their students. If I had waited for my current regular teacher to tell me I was ready to test I probably would have waited forever.
To the best of my knowledge, he has never told anyone to test, and as a result many people in our dojo didn't test for many years and are very experienced for their rank. As long as they stay in our small dojo, that's not an issue.
I have practiced at other dojos (fairly briefly) where I could imagine the sensei encouraging students to test. I have generally asked about testing (except maybe for 4th to 2nd kyu, when I was practicing at a large dojo and had a paralyzing shyness of speaking to the sensei), and I have always tested with more than the required number of hours and prepared for the test outside of regular class.
I guess what I'm saying is that given the imperfections of individual teachers, glitches in comunication, and dojo politics, people have to sometimes make testing descisions more or less from themselves, but take input from senseis and sempai.