Load Tester 4.1 has a number of exciting new features, but in this post, let’s discuss one of the less obvious features: a hosts file which is automatically synchronized with all your Load Engines.
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 hosts file to redirect traffic for a specific hostname.
Using a system hosts file has it’s limitations, however:
To overcome these limitations, Load Tester 4.1 has the option of using it’s own hosts file. On the workstation with Load Tester installed, simply create a new file named “hosts.txt”, located under the folder %USERPROFILE%\.metadata\.plugins\com.webperformanceinc.util . Here, you can either copy & paste your Windows hosts file, or add just the entries specific to the site you need to test. By using Load Tester’s own local hosts file, many of these problems are solved:
Another cool feature of Load Tester’s hosts file is that a hostname can be assigned to another hostname (instead of an IP address). For example, the entry:
testapp2.example.com www.example.com
would allow you to redirect all traffic for www.example.com to same IP address as testapp2.example.com.
We hope that this new feature will help make your testing even easier. Happy Testing!
-Frank, Engineer at Web Performance, Inc.
Frank is an engineer for Web Performance. He is also an advocate for correct fire safety procedures whenever applying massive load to production test rigs.