Specifying User Browser

Applies to LoadComplete 4.97, last modified on May 20, 2019

For thorough testing of web servers it is desirable to emulate users working on different Internet browsers. This way you can see whether the tested web servers have any problems when processing requests sent by some browsers.

The HTTP request header includes the User-Agent field that contains information about the client web application (browser) and includes certain details about the client operating system. This information helps web servers respond to clients in the best possible way.

After the request was recorded, the User-Agent field of recorded requests holds data that corresponds to the browser used for recording. So, if you execute the scenario without modifying it, LoadComplete will emulate the browser that was used for the scenario recording. By changing this field of a request’s header, you tell the tested server that the request is sent by a different browser, not the one that was used for recording. LoadComplete provides several ways to modify the User-Agent field and thus, to specify the desired browser to be used for simulating virtual users:

  • You can specify the web browser for one or more virtual users in the Browser column of the Virtual Users table of the Load Test editor:

    Selecting browsers for virtual users in the Load Test editor

    Browser names correspond to user agent strings specified in the Browsers dialog. You can change predefined user agents and also define new ones.

  • You can also change the browser in the Scenario Editor:

    • The available scenarios are shown as items of the Scenarios collection in the Project Explorer. Right-click the desired scenario and then click Edit. LoadComplete will open the scenario for editing in the Workspace panel.

    • In the Scenario editor, find the desired request and specify the needed user agent string. You can enter the user agent string manually or select it from the drop-down list.

      Specifying User-Agent field in the Scenario editor
    • To save your changes, select File | Save from LoadComplete’s main menu.

    Now all virtual users to which you will assign the modified scenario, will “work” via the specified browser.

Notes:

  • Changing the User-Agent field does not completely emulate the use of the corresponding web browser. Different browsers function differently and they can download the same web page in different manners. For instance, they implement different algorithms for downloading images, script files and other resources of a web page with concurrent and subsequent requests, they can use cached documents, and so on.

    The best way to simulate a virtual user working with certain web browser, is to record a scenario using this browser and then assign this scenario to and execute it with the desired number of virtual users.

  • You can customize predefined browsers and user-agent strings in the Browsers dialog. For a list of valid user agent strings of different browsers on different operating systems, please refer to:

    http://www.useragentstring.com/pages/useragentstring.php

See Also

Creating and Configuring Load Tests
Specifying User Connection Speed
Load Testing With LoadComplete

Highlight search results