The simplest answers are ask for their ID, or for their car keys if they arrive by car.
There are plenty of other options on various forums like https://www.bikeforums.net/general-cycling-discussion/446194-selling-bike-craigslist-test-rides.html https://www.bikeforums.net/general-cycling-discussion/687171-how-do-you-let-potential-buyer-test-ride-your-bike.html
bicycles.stackexchange.com/users/33048/pateksan
Cash in hand.
They give you the purchase price, in cash, and it sits in your pocket while they do the test ride.
bicycles.stackexchange.com/users/2611/joseph_morris
If you have another bike that you are not selling, you can ride next to the person test riding the bike to make sure they don't take off with it.
If you can't do that, then I'd suggest you have the person test riding give you something valuable to them
so they come back to claim it.
bicycles.stackexchange.com/users/43749/user43749
Go to a Skatepark, usually there you have access limited by one or two doors, they are usually free, it's a good place to test a whip, you have mostly good visibility and riders, and depending on your location it may even have guards.
In this kind of eviroments if you shout "thief" or "help" skaters and bikers will help in my experience, they like their skate parks to have a good rep and they tend to push away sketchy people, altough YMMV.
bicycles.stackexchange.com/users/36295/dmb
I've just sold a bike.
The buyer left their bike locked to the fence next to myself place.
I offered to test ride as long and far as they consider necessary.
If they wouldn't have turned up I should have waited there until they recovered their bike.
If that would have taken unusually long I should have put my own lock at their bike and inform them via email or text message.
bicycles.stackexchange.com/users/30402/gschenk
A lot of people are saying to take the ID, but isn't checking the ID sufficient?
Besides, there are other things, like a bank statement, which confirm the name and on top of that their address.
I guess if you live close to the buyer you could ask to meet them at theirs.
You see them leaving their house, how exactly are they going to hide from you?
Another idea is to pick a good spot.
A tennis court for example would be naturally closed off, stand next to the only gate and voila, they'd have to use force to get away with the bike.
Also, sometimes just the good-old first impression is sufficient.
You can base the decision of whether you will let them try it out on that.
bicycles.stackexchange.com/users/43767/Tryb Ghost
I am selling a bike to someone I don't know from Craigslist. I expect that the prospective purchaser will want to test ride the bike before making the purchase.  How can I prevent  them from riding away with my bike during a test ride?
How can I offer a test ride while selling a bike?
bicycles.stackexchange.com
<safety><security>
bicycles.stackexchange.com/questions/62252
bicycles.stackexchange.com/users/43750/Stephen Meschke
There are a number of ways you can stop a potential purchaser from stealing your bike when they take it for a test ride. First, keep something of theirs, like the cash for the bike, ID, car keys, other bike, while they go for the ride. Alternatively, conduct the test ride in an enclosed space, like a skate park or tennis court or ride next to them on another bike. Sometimes, the first impression will give you a good idea of whether they may try to steal the bike or not. You could ask them to leave the payment in cash, the bike or car they arrived in, something valuable or a way to identify them. Riding with them or meeting in an enclosed area can provide some security. In some cases, you might trust someone based on first impressions.
Ask them to leave the payment in cash, the bike or car they arrived in, something valuable or a way to identify them. Ride with them or meet in an enclosed area. Sometimes you might trust someone based on first impressions.