Now for a serious post:
My girlfriend has actually never done this kind of test, but I have known many girls who do. I believe I've heard guys call it the sh*t-test. It is basically to see if you are full of sh*t.
Essentially, the theory is if you catch someone off-guard, you may see another side to them, and that in itself can expose whether or not this person is honest and trustworthy. Supposedly, a girl would do this probably due to previous bad experiences trusting guys. Now, to be honest, I don't fully buy the whole "sh*t-test" thing. I think a large part of it is that some people are critical for a variety of reasons, but also that sometimes teasing, which is an important form of flirting, is taken too far. Some people just plain suck at teasing.
At the end of the day it could be a mix of a bunch of things. I wouldn't want to stay with a girl who kept putting me down, but I would also always have a response ready to turn the negative into a positive. Honestly, all those comments are just games. If you are up to play, have fun. If you would rather skip the games, don't bother putting up with it.