LoadRunner – Runtime Settings – Browser Emulation

LoadRunner Runtime Settings - Browser Emulation

LoadRunner has many unique features to emulate a real-world scenario in performance testing. And, the only purpose is to provide a correct and accurate test result. A simple and best example is ‘Vuser’ or ‘Virtual User’. It is named as virtual but it imitates a real user behaviour. To continue with the emulation behaviour of the LoadRunner, this article covers another key feature which helps to emulate the real browser for a virtual user (Vuser) and the feature is called “Browser Emulation”. Again, one point to recall here is that LoadRunner does not have a real browser to send the request to the server. It acts as a real browser by emulating the features of the real-world browser which gives a feel to the server that the request is coming from a real browser; not from a tool.

When a browser sends a request to a server then a user-agent string is embedded in the request which is identified by the server.

Example of User String:

User-Agent Strings: Mozilla/4.0 (compatible; MSIE 7.0; Windows; en-us)

The identifying details in the user-agent string are (refer to the above example):

  1. Browser Name: Mozilla
  2. Browser Version: 4.0
  3. Operating system: Windows
  4. Language: en-us

‘Browser Emulation’ setting is available in the Runtime Settings of LoadRunner. You can find this setting in the ‘Browser’ category and update the inputs as per the requirement. Refer to the below figure:

LoadRunner - Runtime Settings - Browser Emulation
Figure 01: Browser Emulation Tab

What are the settings available for Browser Emulation in LoadRunner?

There are two settings available for browser emulation:

  1. User-Agent Selection
  2. Browser Cache

1. User-Agent Selection: This setting is used either to create custom user agent string or to use default user agent string. As mentioned above the user agent string has 4 options, no matters whether it is custom or default. Choose the appropriate option as per your requirement. If you want to create custom user string then you need to choose the value from the drop-down list for Browser Type, Browser Version, Platform (Operating System) and Language. The user agent string will be created automatically based on the inputs selected by you.

a. Custom User-Agent String:

LoadRunner - Runtime Settings - Browser Emulation - User Agent
Figure 02: Custom User-Agent Setting

b. Default User-Agent String:

LoadRunner - Runtime Settings - Browser Emulation - Default User Agenet
Figure 03: Default User-Agent

2. Browser Cache: This option emulates the cache setting of a real browser.

Browser cache setting in LoadRunner
Figure 04: Browser cache Setting
  1. Simulate browser cache: It instructs the Vuser to simulate a browser with the cache. On disabling this option, the resources like images, frames etc. will be downloaded once for each page.
  2. Cache URLs requiring content (HTMLs): To parse, verify and correlate specific HTML content. Once you enable ‘Specify URLs requiring content in addition to HTML page’ then the URL must be defined in the ‘Content Types’ field.
  3. Download non-HTML resources: Enable graphic image loading on the page. This will keep Vuser in waiting until all the non-HTML resources on the page are downloaded.
  4. Simulate a new user on each iteration: This option forces a new user to begin a new browsing session.
  5. Clear cache on each iteration: It flushes all the stored cache of the previous iteration.
  6. Simulate prefetch and prerender: It helps to simulate prefetch and prerender tags in HTML5 for a Vuser.

Additional Settings:

  • Use Default: On clicking ‘Use defaults’ button, VuGen resets the browser emulation settings and enables all the default options.

Leave a Reply

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