Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Input Files

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.

...

  • .txt (recommended) or

  • .dat

Input File Options

Option Name

Purpose

File Scope

Defines the scope of the variables which will be (later) extracted from the Input File:

  • global (one-line)

this scope is usually not useful for Input Files because only one line will be read during the entire load test at the start of the test.

  • new line per user

a new line will be read for each simulated user during the load test. This is the proper scope for reading user account data (username/password). The line remains the same for all executed loops of the same user.

  • new line per loop

a new line will be read each time a simulated user executes a loop. The new lines are distributed over all users and loops.

  • NL per inner loop

a new line will be read each time a simulated user executes an inner loop. The new lines are distributed over all users, loops, and inner loops.

Line Order

Controls whether the lines are read in sequential or randomized order.

Comment Tag

Defines a "start character" or a "start string" for commented-out lines. Such lines will be ignored during the load test.

Var Delimiter

Defines the "variable delimiter character" that separates values on the same line (several values/variables can be extracted from the same line).

Trim Extracted Values

Control whether blank characters (white spaces) are removed from the start and the end of the extracted variables.

EOF Action

Controls the behavior when all lines from the Input File have already been read when a new line is requested:

  • reopen file

the file is re-opened. If a randomized line order was set, the lines continue to be randomly read in a new order.

  • stop load test

the load test will be immediately aborted. This option can be used to avoid duplicate logins with the same username/password when fewer lines are available than users, which should be simulated. Note that EOF can also become true for a randomized line order because the lines are first mixed while opening the file and then read.

Text Input Details

Line Column #

the column number (of a line) from which the variable is extracted (1, 2, 3 ..)

Var Name

any new variable name, but with the following naming restrictions:

  • The name can only contain the characters A..Z, a..z, 0..9, and _. Spaces are not permitted.

  • The name must not start with an underline character _

Next, you should test to ensure that the parsing of the Input File works correctly.

This can be done by clicking the Input File button for an Input File definition:

Afterward, you can extract variables from the Input File by clicking one or more times on the variable extractor icon: 

Variable Created from Input File Result:

Input File Example

The following example shows the definition of an Input File, (first) without the assignment of variables:

...