For this point: 5 - login to your back-office of the clone and change there the URL under "preferences - SEO & URL's" for to your clone. Save new settings.
I think it would be necessary a sql code to automate the update of the server's test like this:
UPDATE ps_configuration SET value="test.domain.com" WHERE name="PS_SHOP_DOMAIN";
UPDATE ps_configuration SET value="test.domain.com" WHERE name="PS_SHOP_DOMAIN_SSL";