3 . Parameterization : Input Fields , ADR and Input files

User Input Fields

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:

Input Fields

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.

Assign var to all requests with the same protocol, host, and port

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.

More Tips for using User Input Fields

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:

  1. Create a User Input Field and set a default value (in this case in seconds)

  2. 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]”

  3. 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).


Can't find what you're looking for? Send an E-mail to support@apica.io