Wednesday, July 3, 2013

Web (HTTP/HTML) Protocol in Load runnner

When recording a Web (HTTP/HTML) script, VuGen records the HTTP traffic
between the browser and the server. The scripts contain detailed
information about the recorded traffic.

The Web (HTTP/HTML) Vuser provides two recording levels: HTML-based
script and URL-based script. These levels lets you specify what information
to record and which functions to use when generating a Vuser script. For
more information about selecting a Recording level, 

Tip: For most applications, including those with JavaScript, use Web (Click
and Script) Vusers. For browser applications with applets and VB Script or
for non-browser applications, use the Web (HTTP/HTML) Vuser.

Support for Push Technology:

Vuser scripts run steps sequentially, one step cannot start until the previous
step has completed. A step does not complete until all requested data has
finished downloading. Some websites use push technology in which
downloads are not meant to complete. Data is periodically downloaded as
updates occur.

When a Vuser script contains steps which access resources using push
technology, the Vuser script gets stuck on the step until a timeout occurs.
This is a “false” timeout because the site is functioning as designed.

Expert users can work around this problem by changing the conditions for
the step to complete. For more information, see the
web_reg_cross_step_download function in the Online Function Reference
(Help > Function Reference).

Working with Cache Data:

You can save stored data into your browser’s cache, and load it at a later
point in the script.

To implement this within your script, you manually add the
web_dump_cache and web_load_cache functions.

Dumping Information to the Cache
Transferring data to the cache is called dumping the information. You run
the web_dump_cache function to create a cache file in the location
specified in the FileName argument. You only need to run this function
once to generate the cache file.

In the following example, the web_dump_cache function creates a cache file
in C:\temp for each VuserName parameter running the script.

web_dump_cache("paycheckcache","FileName=c:\\temp\\{Vuser
Name}paycheck", "Replace=yes", LAST)

If you run a single Vuser user ten times, VuGen creates ten cache files in the
following format, where the prefix is the VuserName value:

You can modify the first and second arguments (paycheckcache and
paycheck in this example) to reflect the current transaction name. Place this
function at the end of your script, after you have loaded all of the resources.
Loading Information from the Cache

The web_load_cache function loads a cache file whose location is specified
in the FileName argument. Note that the web_load_cache function requires
the cache file to exist. Therefore, you can only run this function after
running web_dump_cache.

In the following example, the web_load_cache function loads the paycheck
cache files from C:\temp

web_load_cache("ActionLoad","FileName=c:\\temp\\{VuserName}paycheck",LAST)

No comments: