WAIT! DON'T DO THAT!
With deference to Steve, that will disable your viewing your online website which, IMHO, is a horrid thing to do!
The way I've setup my test server is to remove the domain extension (.tld) OR merely use my own acronym for my online domains. Yes, update the hosts file (using 127.0.0.1) and your httpd-vhosts.conf with the extensionless domain name or acronym.
THEN you will have to alter your test server's WP configuration file (by removing the .tld or replacing with the acronym). After that, you'll be set to duplicate and properly test on your own server.
FWIW, Steve's comment about Win7/Vista is golden but doesn't go far enough. I've installed my PHP and Apache on a drive partition to keep as far away from WinDoze's "protection" so that I can actually test my files on my test server and recommend that (with the obvious exception of the the WinDoze hosts file which requires Admin access to save any changes you make there).