I should add that the reason I went for the long test ride was because the bike had a compact double and I wanted to make sure it would work for me on hills. I told the LBS manager I'd like to try it on a specific hill that he includes on his weekly shop rides, and he said yes.

I got my first road bike from the same people but at their original store location (they have two now) and I didn't ride it for that long but they did encourage me to ride in a nearby residential neighborhood that had some hills.

I think having some variety in terrain is important, so you can see if the gears shift well and if they are sufficient for your needs. (Unless you live in a really flat area, in which case I guess you test riding in a headwind vs a tailwind??)