background image
<< Parameterizing a Web Vuser Script | Data-table parameterization >>
<< Parameterizing a Web Vuser Script | Data-table parameterization >>

About Parameterizing a Script

Creating Vuser Scripts
Chapter 23, page 384
Web Vuser Scripts · Parameterizing a Web Vuser Script
In
About Parameterizing a Script
You start by recording a Web Vuser script that performs a single business process.
After you finish recording, you can "parameterize" certain arguments in the script
so that the script runs the same business process numerous times. In each run, the
Vuser changes the values of the parameterized arguments. You supply the list of
values.
For example, consider a web site that allows you to request information on any
product in the company's catalog. To submit a request, the user types in the product
name and clicks the Submit button. In order to test the web server under the load
of many users, you create a number of Web Vusers. Each Vuser requests
information about ten different products. To create the required Vuser scripts, you
have two options:
·
You could record a process where the user submits ten requests. To have different
Vusers submit requests for different products, you would have to record different
scripts. This is a slow, laborious, and inefficient solution.
·
You could use parameterization. To use parameterization, you record a script that
accesses the web site and submits just a single request. Then you parameterize
the script, and supply the Vuser with a list of the products to query. When you run
the script, the Vuser submits a separate query for each product in the list.