LoadRunner parameterization

to parameterize

         When multiple virtual users run the script, they will submit the same record, which does not conform to the actual running situation and may cause conflicts. In order to more realistically simulate the actual environment, a variety of inputs are required. Parameterization is a nice way to go. Advantages: It can make the length of the script shorter, can use different values ​​to test the script.

Parameter Type

  • l DateTime: Use DateTime instead of date/time input. The property setting is very simple, just select a format. Custom formats are also possible.
  • l Group Name: I don't know if it can be used for drinking, but the setting is relatively simple. LoadRunner uses the Vuser Group where the virtual user is located instead. But when running in VuGen, the Group Name will be None.
  • l Load Generator Name: In actual operation, LoadRunner uses the machine name of the Load Generator where the virtual user is located instead.
  • l Iteration Number: In actual operation, LoadRunner uses the number of cycles in power of the test script instead.
  • l Random Number: random number. The range of random numbers that can be generated in the property settings.
  • l Unique Number: a unique number. In the property settings, you can set the size of the first number and the incremented number. (The increment here means that each user takes the increment of the first value, and the difference between the two adjacent cycles of each user is 1.) For example: the initial number is 1, and the increment is 5, then the first A user takes the value of 1 for the first loop, and 2 for the second loop; the second user takes the value of 6 for the first loop and 7 for the second loop; and so on.
  • l Vuser ID: The setting is relatively simple. In actual operation, LoadRunner uses the ID of the virtual user instead, which is controlled by the Controller. But when running in VuGen, the VuserID will be -1.
  • l File: You need to edit the file in the property settings, add content, or get data from the current database.
  • l User Defined Function: Extract data from user-developed dll files.

Parameterized connection database

a. Select the data to be parameterized, right-click, and select "Replace with a parameter"

b. Click the "Properties..." button

c. Connect to the database and select the username from the data table. Click the "Data Wizard" button.

d. After adding the data source to the next step.

e. After entering the connection string to connect to the database and the data retrieval statement, click "Finish".

f. Further set the way of parameterized reading data;

Note: LoadRunner allows a maximum of 100 parameterized users. If you need to expand the number of parameters, you can modify it in the vugen.ini file under the installation path: MaxVisibleLines=1000. (This setting allows the maximum number of parameterized users to be 1000)

There are several options for "Select next row": Sequential, Random, Unique.

There are several options for "Update value on": Each iteration, Each occurrence, Once.

Combination type:

Sequential

  • Combined with Each iteration: will extract the next value from the data table for each fall.
  • Combined with Each occurrence: will extract the next value from the data table for each occurrence of the parameter, even if it is in the same iteration.
  • Combined with Once: The value assigned in the first iteration will be used in all subsequent iterations of each Vuse.

Random

  • Combined with Each iteration: A new random value will be drawn from the data table for each iteration.
  • Combined with Each occurrence: will extract a new random value from the data table for each occurrence of the parameter, even if it is in the same iteration.
  • Combined with Once: The random value assigned in the first iteration will be used in all iterations of the Vuser.

Unique

  • Combined with Each iteration: will extract the next unique value from the data table for each iteration.
  • Combined with Each occurrence: will extract a new occurrence from the data table for each occurrence of the parameter, even if it is in the same iteration.
  • Combined with Once: The unique value assigned in the first iteration is used in all subsequent iterations of each Vuser.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324851289&siteId=291194637