{"id":918,"date":"2010-05-17T13:47:11","date_gmt":"2010-05-17T17:47:11","guid":{"rendered":"http:\/\/www.webperformanceinc.com\/load_testing\/blog\/?p=918"},"modified":"2010-05-17T13:47:11","modified_gmt":"2010-05-17T17:47:11","slug":"keeping-your-hosts-files-in-sync-with-load-tester-4-1","status":"publish","type":"post","link":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/05\/keeping-your-hosts-files-in-sync-with-load-tester-4-1\/","title":{"rendered":"Keeping your HOSTS files in sync with Load Tester 4.1"},"content":{"rendered":"<p>Load Tester 4.1 has a number of exciting new features, but in this post, let&#8217;s discuss one of the less obvious features: a hosts file which is automatically synchronized with all your Load Engines.<\/p>\n<p>Consider how often this happens: the development environment is mirrored from your production environment, and then updated to an internal version of the application, ready for testing. Since the development environment is otherwise a mirror of the production system, it is configured with the same virtual hostnames as your production environment, and \/ or it may share the same SSL certificates which identify it with the hostname of your production environment. Or perhaps the DNS entries have not yet been updated so that the hostname of your site can be resolved. In either case, the site needs to be accessed with a URL which would normally not be directed at your test site. Your network administrator may point out a quick fix: add an entry to your <a href=\"http:\/\/en.wikipedia.org\/wiki\/Hosts_file\">hosts file<\/a> to redirect traffic for a specific hostname.<\/p>\n<p>Using a system hosts file has it&#8217;s limitations, however:<\/p>\n<ul>\n<li>When the hosts file is updated, applications will not pick up the change until the application is restarted.<\/li>\n<li>Changing the system&#8217;s host file requires Administrator privileges, which can lead to UAC headaches on newer versions of Windows.<\/li>\n<li>It is easy to forget the current state of the hosts file, if you find yourself changing it frequently to switch back and forth between your production and test environments.<\/li>\n<li>When you run a test, each \tmachine&#8217;s own hosts file must be in sync and have the correct entries.<\/li>\n<\/ul>\n<p>To overcome these limitations, Load Tester 4.1 has the option of using it&#8217;s own hosts file. On the workstation with Load Tester installed, simply create a new file named \u201chosts.txt\u201d, located under the folder %USERPROFILE%\\.metadata\\.plugins\\com.webperformanceinc.util . Here, you can either copy &amp; paste your Windows hosts file, or add just the entries specific to the site you need to test. By using Load Tester&#8217;s own local hosts file, many of these problems are solved:<\/p>\n<ul>\n<li>Entries in Load Tester&#8217;s own hosts file are automatically used every Load Engine during a Load Test.<\/li>\n<li>When the file is changed, the changes will be taken into account before any new recording, replay, or Load Test \u2013 without having to restart the application.<\/li>\n<li>Since the file is used just by Load Tester, you can keep your testing requirements separate from other applications.<\/li>\n<li>Since the file does not affect the operating system itself, no special permissions are required to modify it.<\/li>\n<\/ul>\n<p style=\"margin-bottom: 0in\">Another cool feature of Load Tester&#8217;s hosts file is that a hostname can be assigned to another hostname (instead of an IP address). For example, the entry:<\/p>\n<pre>testapp2.example.com\twww.example.com<\/pre>\n<p>would allow you to redirect all traffic for www.example.com to same IP address as testapp2.example.com.<\/p>\n<p>We hope that this new feature will help make your testing even easier. Happy Testing!<\/p>\n<p>-Frank, Engineer at Web Performance, Inc.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Load Tester 4.1 has a number of exciting new features, but in this post, let&#8217;s discuss one of the less obvious features: a hosts file which is automatically synchronized with all your Load Engines.<br \/>\nConsider how often this happens: the development environment is mirrored from your production environment, and then updated to an internal version of the application, ready for testing. Since the development environment is otherwise a mirror of the production system, it is configured with the same virtual hostnames as your production environment, and \/ or it may share the same SSL certificates which identify it with the hostname &hellip; <a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/05\/keeping-your-hosts-files-in-sync-with-load-tester-4-1\/\">Continue reading &raquo;<\/a><\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[50,49,51],"class_list":["post-918","post","type-post","status-publish","format-standard","hentry","category-load-tester-software","tag-load-engine","tag-load-tester","tag-web-performance-load-tester"],"_links":{"self":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/comments?post=918"}],"version-history":[{"count":2,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/918\/revisions"}],"predecessor-version":[{"id":920,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/918\/revisions\/920"}],"wp:attachment":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/media?parent=918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/categories?post=918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/tags?post=918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}