I have never heard of a gun shop allowing a new gun to be test fired before purchase. If the shop also has a range ("IF"), they may have a rental gun of the same make and model that you can try, but they can't let tire kickers shoot every new gun in stock or they won't have any new guns in stock. If I were buying a new gun, I would be very unhappy if some other customer had tried it out before I saw it.
Used is another matter, but many used guns are on consignment (which means they are not the property of the shop and the shop knows nothing about the mechanical condition). I doubt very much any shop would allow you to test fire a consignment pistol, either.
The best you can do is haunt ranges that rent guns, and try as many rental guns as you can get your hands on.