Dataset Using File Parameter is formerly called File Parameter. The Dataset Using File Parameter is used to read data values from a file that the user has created or uploaded and can be used in the URL, Header, and Body.

### Adding The Parameter

The following fields need to be filled to add the Dataset Using File Parameter :

- Parameter Name : This field is used to set the name of the parameter, which is used in the parameterization of the script with curly braces { } . It is a mandatory field.
- Parameter Type(s) (only in case of Advance Settings) : Select the following from the drop-down :
  - Parameter Type Value : The value from the data file is treated as the file parameter value.
  - Parameter Type File : The value from the data file is treated as a new file path and content from that file is treated as the value.
  - Parameter Type File_Param : The value from the data file is treated as a file path and the content from that file is treated as a parameter whose value is treated as the parameter value.
- Column : It is the column on which the parameter is to be entered.
- Encrypt : To encrypt the parameter name check this box.
- Data Directory : Data directory is a directory that is used to save all data files. Data from data files will be used in Script as a value of the parameter variable.
- Data File : It shows the location from where the data file will be selected and uploaded in the data dir directory. Click the cloud icon which will open the popup window. Users can browse the location in the pop-up window and upload the data files in the selected Datadir directory. From the browse and get the location from where the file is to be fetched.
- First Data Row : In some situations, the user might want the Load Test to start reading data from a particular line number. So, the user can use this field to indicate Load Test which lines it should consider as the first data row. By default, the first data row is 1.
- Column Delimiter : This field specifies which character in the data file should be considered as a column separator. By default, the column delimiter is ‘,’. Users can also use special symbols as the column delimiter.

## Advanced

#### Selection Mode

Any data file can contain various numbers of rows. Value selection mode specifies how a variable value is initialized from the list of values. Possible options are :

- Sequential : This option selects rows sequentially i.e. the first row, then the second row, then the third row, and so on. It is selected by default.
- Random : This option selects rows randomly. When enabled, the Load Test can pick any row from the data file.
- Weighted Random : Value is randomly selected from the list of values but in a weighted random fashion. It means certain values would be selected more often than others depending upon the weight of certain values.
- Unique : This option allows the selection of a unique value from the data file for each concurrent session, meaning that different values will be utilized for all the sessions running simultaneously.
- Use Once : This option uses one data value only once. Once a data value is used, it is deleted from the data file. Each deleted value is written in a separate data file with the extension .used.
- RemoveDupRecords (if selection mode is UNIQUE) : Select 'Yes' if you want to remove the duplicate records otherwise select 'No'.
- UseOnceWithinTest (if selection mode is USE ONCE) : Select 'Yes' if you want to use data value once within the test otherwise select 'No'.
- Save Last Used Data After (if selection mode is USE ONCE) : In this you can save last used data either after every value or a particular value.
- After All Parameters are used(if selection mode is USE ONCE) : Select any of the following option once all the parameters are used:
  - Abort Session
  - Abort Page
  - Abort Test
  - Abort User

#### Updated Value on

This field is used to specify when to pick a new data value, i.e., generate once and use this value for the entire session, or pick a new data value every time File Parameter is used. Users can have two options :

- Session : If Session is selected, data is picked only for the first use of File Parameter. In this instance, the same value is applied throughout the entire script.
- Use : If Use is selected, data is picked from the data file for each use of File Parameter i.e. if File Parameter is used, for example, 50 times in the script, then for every reference, the new data value is picked.
- New Vuser : Data is picked only for Vuser.

#### Encoding Options

This option is used to encode special characters to their ASCII value. This option contains 3 fields :

Encode : In Load Test, the user can encode any number of special characters i.e. all, specific, or none. Users can have the following options :

- Encode all special characters except (+), (-), (.), (_) : All special symbols except + - . _ are encoded. It is the default value.
- Encode only specified characters : The user can specify which special characters to encode in Characters to encode .
- Do not encode special characters : None of the special characters is encoded. However, space is encoded always.

Characters to encode : If the user selects Encode only specified characters option in Encode, then this field becomes active. Here user can specify which special characters should be encoded.

Encode Space By : This option specifies to Load Test how to encode space. Users can have two options : ‘+’ and ‘%20’. If ‘+’ is chosen, Load Test encodes space by ‘+’ and if ‘%20’ is chosen, Load Test encodes space by ‘%20. The default value is ‘+’.

Ignore Invalid Data Lines : To ignore the invalid data lines, check the respective available check box.

Copy to run : This option is available only when you are using the data directory other than the script. It will copy the data directory on the test run at the below path :

Notes :

1. Data directory can be overridden from the scenario only if you are using a data directory other than the script.
2. You can edit data files upto 10 MB. For more than 10 mb it will open as Read Only mode.
3. If your values contain special characters that you prefer not to encode, you have the choice of using either "Do not encode special characters" or "Encode only specified characters." A practical illustration of this situation can be found in the domain name https://www.cavisson.com, which includes special characters such as (:/).