How to Utilize a Custom Host File Within a Load Test

It is possible to utilize custom host files for DNS resolution when you run one or more scripts in a load test. First, bundle the hosts file to the ZebraTester script by following the instructions in this article.

If you wish to utilize the custom host file when load testing a single script

Navigate to Loadtest > New Test from the top navigation bar of ALT:

Specify or upload the script which contains the hosts.txt file. In the “DNS” section, click on the “DNS Hosts File” dropdown and select the “hosts.txt” file:

If the file does not show up, verify that you named the file correctly - it must include .txt!

Specify the rest of the test options as you normally would and run the load test.

If you wish to utilize the custom host file when running a Scenario

It is possible to utilize the custom host file for one or more scripts within a scenario. Navigate to Loadtest > Create & Run Scenario:

Load the scenario you wish to run by clicking “Load Scenario”:

Click on the “Scripts” tab and click on the cog icon to open the individual script options.

At the bottom of the page, there will be an option to specify the hosts.txt file as the DNS Hosts File if the hosts.txt file has been zipped into the script:

Repeat the process for each script in the scenario which needs to include the custom host file. Then run the scenario as you normally would.

Cannot find what you're looking for? Send an E-mail to support@apica.io.