There is some of that, depending upon the school. For me (as an instructor) the point of testing is to - in a relatively short window of time - get a quick overview of everything I think they need to be ready for the next level. My tests (at least at lower levels) are pretty casual, and they sometimes aren't even aware I'm testing them. I'd do less of that as the ranks increase. Some schools/instructors don't even really test much; they just evaluate along the way. Some have formal tests that are just a point to test people under stress, and it would take a lot to fail. Some have tests that are Very Big Deals (like @drop bear was talking about recently) that are meant to push students harder and further than regular training. Most instructors with formal tests won't test someone they think isn't ready, whether the test is evaluation, confirmation, or a Very Big Deal.I have a theory that the real testing takes place in class, and the "test" is mostly just for show. Not to say a person couldn't completely flub the test and fail, but in general, when the head instructor tells you that you are ready to test, the vast majority of the time, he has already decided based on your work in class that you have passed.
I saw evidence of this just the other day. I arrived early for class, and the head instructor was working with two younger high purple belts, both of whom were not performing their forms to the instructor's satisfaction. I heard the head instructor tell both purple belts to work on their forms over the weekend and come to class next Wednesday, but that unless they improved a lot, he would not allow either of them to test for brown belt next Friday.