The Value access type settings specify the order in which virtual users take values from variables of the list, Excel and database types. You select the desired type on the Select access type page of the Variable wizard.
The wizard’s page contains the same values for list, Excel and database variables. These values can be applied to all these variable types, because these variables return data of the same structure: a database variable returns a list of values of certain database table column, an Excel variable returns a list of values of certain worksheet column, and list variables returns a list of values that you defined in LoadComplete. The same structure of data means you can apply the same rules for working with this data.
You can choose one of the following access types on the page:
-
Item index equals virtual user index - Each virtual user uses the value, whose position in the list (Excel sheet or database table) is equal to the user’s global index. This index is calculated based on the order of user groups defined in the test and the user’s index within the group. It does not depend on the playback order of users. The variable has the same value in all the requests made by the given virtual user.
Tip: Use this option for user names, passwords and other kinds of values that should be unique for each virtual user used in the test. Example: Consider a test that defines three groups of virtual users in the order shown in the table below. This table also shows allocation of values between virtual users from different groups. Values associated with individual virtual users are marked with different colors.
Group / User User’s
Global IndexRequest 1 Request 2 Request 3 … Group 1 (3 users) Virtual User 1 1 Value 1 Value 1 Value 1 … Virtual User 2 2 Value 2 Value 2 Value 2 … Virtual User 3 3 Value 3 Value 3 Value 3 … Group 2 (1 user) Virtual User 1 4 Value 4 Value 4 Value 4 … Group 3 (2 users) Virtual User 1 5 Value 5 Value 5 Value 5 … Virtual User 2 6 Value 6 Value 6 Value 6 … -
Item index equals virtual user index within a station - In this case, each workstation has its own copy of the value list. Each virtual user uses the value, whose position is equal to the user’s index within the station. This index is calculated based on the order of user groups defined for that station and the user’s index within the group. For example, the first virtual user on the station uses the first value, the second user - the second value and so on. The variable has the same value in all requests made by the given virtual user.
Example: Consider a test that uses two load stations and defines four groups of virtual users in the order shown in the table below. This table also shows the allocation of values between virtual users from different groups. Values associated with individual virtual users are marked with different colors.
Workstation Group / User User’s Index
Within StationRequest 1 Request 2 Request 3 … Station 1 Group 1 (2 users) Virtual User 1 1 Value 1 Value 1 Value 1 … Virtual User 2 2 Value 2 Value 2 Value 2 … Group 2 (1 user) Virtual User 1 3 Value 3 Value 3 Value 3 … Station 2 Group 3 (1 user) Virtual User 1 1 Value 1 Value 1 Value 1 … Group 4 (2 users) Virtual User 1 2 Value 2 Value 2 Value 2 … Virtual User 2 3 Value 3 Value 3 Value 3 … -
Next value on each use - The variable returns the next value in the list on each use. If the variable is used multiple times within the same request, each instance will use the next value.
Example: The following table illustrates the distribution of list items between virtual users on two workstations. The example assumes that virtual users perform the same requests and that the variable is used in all requests.
Request Playback Order Item Index Workstation 1 Workstation 2 Workstation 1 Workstation 2 Request 1 of VU 1 Value 1 Request 1 of VU 1 Value 2 Request 1 of VU 2 Value 3 Request 2 of VU 1 Value 4 Request 1 of VU 2 Value 5 … … … … -
Next value on each use within a station - In this case, each workstation has its own copy of the list. The variable returns the next value on each use on the given workstation.
Example: The following table illustrates the distribution of list values between virtual users on two workstations. The example assumes that virtual users perform the same requests and that the variable is used in all requests. Item indexes associated with individual workstations are marked with different colors.
Request Playback Order Item Index Workstation 1 Workstation 2 Workstation 1 Workstation 2 Request 1 of VU 1 Value 1 Request 1 of VU 1 Value 1 Request 1 of VU 2 Value 2 Request 2 of VU 1 Value 3 Request 1 of VU 2 Value 2 Request 1 of VU 3 Value 4 … … … … -
Next value on each use by a virtual user - In this case, each virtual user has its own copy of the variable and data list. The variable returns the next value every time the given user accesses it. That is, each virtual user starts with using the first value, then the second value, then the third value, and so on.
Example: consider a test that defines three groups of virtual users in the order shown in the table below. This table also shows allocation of values between virtual users from these groups. It is assumed in this example that the variable is used once in each request. Values associated with individual virtual users are marked with different colors.
Group / User Request 1 Request 2 Request 3 … Group 1 (3 users) Virtual User 1 Value 1 Value 2 Value 3 … Virtual User 2 Value 1 Value 2 Value 3 … Virtual User 3 Value 1 Value 2 Value 3 … Group 2 (1 user) Virtual User 1 Value 1 Value 2 Value 3 … Group 3 (2 users) Virtual User 1 Value 1 Value 2 Value 3 … Virtual User 2 Value 1 Value 2 Value 3 … -
Random - The variable returns a random value from the data list on each use. If the variable is used multiple times within the same request, each instance will have a random value.
Note: | No matter what option is selected, when the variable reaches the end of the data list, it repeatedly continues from the beginning of the list. |
For more information on list, Excel and database variables and their parameters, see these topics: List Variables, Excel Variables, Database Variables.