3. Parameterization: Input Fields, ADR and Input Files
Last updated
Was this helpful?
Last updated
Was this helpful?
Open image-20210308-205732.png
User Input Fields are load test program options (arbitrary global variables), for which you are prompted at the start of the load test. The user input will be stored inside the corresponding global var. The following example uses a User Input Field to make the hostname of the URL calls variable, in order that the same load test program can be executed against a development system and a test system, without the need to record two web surfing sessions.
After the User Input Field has been defined, it can then be assigned to the hostname (in this example). You can click on any recorded URL in the main menu which contains the "correct“ hostname; that is, the hostname which you want to make variable. Then click the Var Assigner button in the HTTP request header:
Open image-20210308-211422.png
Assign to
Whether the variable should be assigned to the protocol (HTTP/HTTPS), to the hostname, or to the TCP/IP port. In case you want to make more than one of these items variable, you must create additional User Input Fields.
Assign from Var
select the variable which was created when the User Input Field was defined.
when checked, the variable will be assigned to all URL calls which use the same protocol and the same hostname and the same TCP/IP port.
It may be necessary to assign the hostname again to HTTPS requests if you have recorded a session that uses both the HTTP and HTTPS protocols within the same web surfing session.
The User Input Field will be displayed when the load test program is started. A maximum of 12 User Input Fields can be defined.
User Input Fields are also often used to vary the “user’s think time". Another example would be the setting of the booking date for financial transactions.
Note: if you start a load test job optionally from a script (see Application Reference Manual), you must pass the User Input Field as an additional argument to the load test program. The name of the program argument is the name of the variable which was created when the User Input Field was defined; for example, for a variable named "hostname" the corresponding argument specification would be:
java PrxJob transmitClusterJob “Cluster 1“ Test01 -u 100 -d 300 -t 60 -nolog -hostname “testsys.ggjhkjg.com“
Example - Adjustable User’s Think Time
The following example shows how the user’s think time of the page breaks (web pages) can be dynamically set every time when starting a load test:
Create a User Input Field and set a default value (in this case in seconds)
In the main menu, assign the variable of the User Input Field to the user’s think time of the first-page break by using the option “Apply new user's think time values for all page breaks [2..n]”
After that, you can freely choose the user’s think time of the web pages every time when starting the load test. The value of the User Input Field is also shown in the load test result detail menu (test scenario).
Input Files can be used to extract variables from a text file, such as a username and a password per simulated user, assigned to a login form. However, the functionality of input files is generic, which means that variables for any purpose can be extracted.
Click the Add Input File… button inside the Var Handler to define a new Input File and enter a simple file name without a directory path. Please note that this action creates only the input file definition but that it does not create the input file itself on disk. This means that the input file must also exist on disk and that it must be placed inside the same Project Navigator directory where the load test program is stored.
Apica Data Repository (ADR) aka The Apica Table Server
Assign var to all requests with the same protocol, host, and port
Open image-20210308-212252.png
Open image-20210308-212705.png
Open image-20210308-213849.pngOpen image-20210308-215718.png