LoadRunner – Runtime Settings – Preferences – HTTP

LoadRunner - Runtime Settings - Preferences - HTTP

‘HTTP’ setting helps to set the option required for the connection between load generator and application. The ‘HTTP’ setting is available under the ‘Preference’ tab of LoadRunner Runtime Settings. There are multiple options in ‘HTTP’ which you can set according to your requirement related to the HTTP connection. Here, you can define the HTTP version, extend the connection time-out, set Zlib header and other compression and cache options.

LoadRunner - Runtime Settings - Preferences - HTTP
Figure 01: LoadRunner – Runtime Settings – Preferences – HTTP

Below are the options available in the ‘HTTP’ setting under the ‘Preferences’ tab of LoadRunner Runtime settings:

1.  HTTP version

You can specify the version of HTTP to use. There are two options are available:

  1. 1.0
  2. 1.1

Whatever the version you choose, LoadRunner includes version related information in the HTTP request header whenever a Vuser sends a request to a Web server.

2. Keep-Alive HTTP connections

Majorly HTTP 1.1 supports this option. The default HTTP connection is usually closed after each request has been completed, meaning that the server closes the TCP connection after delivering the response. In order to keep the connection open for multiple requests, the keep-alive connection header can be used. Keep-alive is a term used for an HTTP extension that allows persistent or continuous connections. These long-lived HTTP sessions allow multiple requests to be sent over the same TCP connection. This improves the performance of the Web server and clients.

The keep-alive option works only with Web servers that support keep-alive connections. This setting specifies that all Vusers that run the Vuser script have keep-alive HTTP connections enabled. By default, this option is enabled.

3. Include Accept-Language request header

It provides a list of language which can be accepted by the server. Basically, this setting is used to update the user-agent string. There are 2 options available in the list:

  1. None
  2. en-us

You can also change the user-agent string through “Browser Emulation” setting. To get more details, refer the below URL:

LoadRunner Runtime Settings – Browser Emulation

Note: Browser emulation settings overwrites HTTP accept-language settings.

4. Mark HTTP errors as warnings

To issue a warning instead of an error upon failing to download resources due to an HTTP error, this option should be checked. By default it is unchecked.

5. HTTP-request connect timeout 

The time, in seconds, that a Vuser will wait for the connection of a specific HTTP request within a step before aborting. Timeouts provide an opportunity for the server to stabilise and respond to the user. The default value is 120 seconds and the maximum value is 32000 seconds.

6. HTTP-request receive timeout

The time, in seconds, that a Vuser will wait to receive the response of a specific HTTP request within a step before aborting. Timeouts provide an opportunity for the server to stabilise and respond to the user. The default value is 120 seconds and the maximum value is 32000 seconds.

7. HTTP Keep-Alive timeout

An HTTP connection must complete the activities before reaching the defined time limit. Once the timeout reaches then the connections are closed. The default value is 60 seconds, the minimum allowable value is 10 seconds and the maximum allowable value is 2147483647 seconds.

8. Request zlib headers

It sends request data to the server with the zlib compression library headers. By default, requests sent to the server include the zlib headers. This option lets you emulate non-browser applications that do not include zlib headers in their requests. By default, it is enabled. To get more information on zlib, refer below link:

https://zlib.net/

9. Accept server-side compression

It informs the server to accept compressed data. The available options are:

  1. None (no compression)
  2. gzip, deflate (accept gzip or deflate compression)
  3. gzip (accept gzip compression)
  4. deflate (accept deflate compression)

The default value is “gzip and deflate” compression.

To manually add compression, enter the following function at the beginning of the script:

web_add_auto_header(“Accept-Encoding”, “gzip”);

To verify that the server sent compressed data, search for the string Content-Encoding: gzip in the section of the server’s responses of the replay log. The log also shows the data size before and after decompression.

Note that by accepting compressed data, you may see a significant increase in the CPU consumption of the server.

10. Delete unreferenced cache entries

In this field, you provide the number of iterations after that unreferenced cache can be deleted. Set to zero to never delete cache entries. 

Note: HTTP 1.1 supports Persistent Connections (Keep-Alive HTTP connections), HTML compression and Virtual Hosting (multiple domain names sharing the same IP address).


Leave a Reply

Your email address will not be published. Required fields are marked *