Typically I develop my websites on trunk, then merge changes to a testing branch where they are put on a \'beta\' website, and then finally they are merged onto a live branc
Best way to do this:
Remove 'App Domain' from 'Basic Info'
Set website's 'Site URL' to : "http://localhost/" .
That simple.
(This only apply if you don't have a live system running in parallel to the test env. In that case get yourself another key.)