VuGen: Emulate Web Site User Abandonment

Let’s discuss the “ResourceByteLimit ” option in web_url() function within VuGen. This attributes can help emulate a user that does not wait for a complete page to download before clicking on another URL. It is typically used for testing the availability of a site (as opposed to load testing a site) while minimizing network traffic.

Before each resource download, the script replay engine will check if the total download size is less than the ResourceByteLimit specified. If so, it will continue the download. Else, it will stop the download.

Example:

In this example, lets assume there is an image of ~48KB on the page.

Case 1: ResourceByteLimit not specified. This means no limit on the bytes of resources to be loaded, and thus, the page will be loaded with image(s).

Case 2: ResourceByteLimit=0. This means that only 0 bytes of resources should be loaded, and thus, no image will be loaded.

Case 3: ResourceByteLimit=x. This means that only x bytes of resources should be loaded.

The following request will limit the size of resource (GIF, CSS, JS, etc…) to 2 bytes:

web_url("coolwebsite",
 "URL=http://www.youpieceofcrap#$.com/",
 "Resource=0",
 "ResourceByteLimit=2",
 "Snapshot=t11.inf",
 "Mode=HTML",
 LAST);

You might set an agreed upon limit for file sizes and use something like this up to prove out what abandonment looks like for mobile users who abandon sites more quickly, and have less tolerance. It might show the developers the impact of using too many big graphic images.

Note: According to the function reference, you cannot use this attribute in HTTP-mode or when using concurrent groups. It also won’t work with Wininet replay. If you don’t know what this means, then spend some time in the documentation!

What's Next?

Did you enjoy this article? Help spread the word by sharing:

Join the Northway Navigator Club today and get access to restricted content including our best tips and tricks. Membership is free! You will also receive free email updates by registering.

Engage in the conversation and leave a comment:

Scott Moore

About Scott Moore (153 articles)

With over 20 years of IT experience with various platforms and technologies, Scott has tested some of the largest applications and infrastructures in the world. He is a Certified Instructor and Certified Product Consultant in HP’s LoadRunner and Performance Center products. He currently holds HP certifications for ASE, ASC, and CI. A thought leader in the APM space, he speaks regularly at IT conferences and events



  • Richard Bishop

    This is a good idea, some test tools (e.g. SilkPerformer) have the ability to simulate different types of users (easily bored / impatient and so on), this is a way to achieve the same functionality by perhaps introducing a random byte limit into the script.