How do I test ride a bike that I'm looking at buying?
30 seconds in the parking lot: Do you feel comfortable on the bike. Does it fit you (and not completely just "bike fit"...do you like it...dig it...get it). That's what I would spend the first thirty seconds on.

Medium ride: How does it respond and do you like that response. I personally like my road bikes to be a bit "quick and twitchy" but I know a lot of folks that feel like the bike is going to do something on it's own...they want a bike that is a bit more relaxed. Several factors go into this, geometry, materials, components, etc, so best way to see if it matches what you want is to ride it.

Longer Ride: Start with mellow flat if you can to just get a feel for the bike and to warm up a bit. Then pick things up, but this is a test ride, not a race, go 70-80% but keep a bit in reserve...you don't know this bike completely yet. How does it react when you really put some power to the cranks? Do you like how it handles in a bit of a descent? How does it feel in a climb?

I would also check the brakes, drivetrain, etc...but this would actually be lower on my list. The "check the gears and the brakes", for me, is more about safety...if it doesn't shift well and has at least minimally okay components, I (or my LBS) can get it shifting nicely. Same idea with the brakes.

If it's a used bike you'll want to do a safety check BEFORE a test ride.

Good luck on finding the perfect bike...Happy Riding.