Skip to content

Data Files

Data Files are external sources of data for your scripts. The lines will get evenly divided up among the agents for use.

Uploading Data Files

Clicking the Data Files tab takes the user to the main screen, which lists all the previously created Data Files.

Data files Main Page

Data files Main Page

Note

Currently, Tank supports data files with CSV (Comma Separated Values), and XML format only.

The data file is read into shared memory only once, even if it is read by multiple virtual users.

Usually you will use one of the functions below only once in your script for each file you load.
The following two functions can be used in Tank to read a file:

  • #{ioFunctions.getCSVData(COLUMN_NUMBER) - This function is used to read a default data file associated with the project. A Data File is default if there is only one in a particular job.
  • #{ioFunctions.getCSVData('FILE_NAME', COLUMN_NUMBER) - This function can be used to read a specific data file when you have to read from multiple data files used for the same script or multiple scripts in a project (i.e. separate data files for personal information and login credentials).

Tip

  • Column Number 0 represents the 1st column in the file.
  • It is important that all the user data files needed by your test script are added to your project.

Clicking on the Magnify icon will allow you to see the contents of the data file.

View Data File Content

View Data File Content

Steps to Data File Upload

  1. In the Data Files Tab, click the Upload link to add data files. The Upload Data Files dialog box opens.
    Data Files Home Page
    Data Files Home Page
  2. From the Upload Data Files dialog box, click Choose to navigate and select the data file(s) or zip archives to add to the project.
    If a zip archive is uploaded, Tank will recursively upload all files with the .csv extension.
    Choose Data File to Upload
    Choose Data File to Upload
  3. Click either Upload or the arrow next to the box to upload the data file. You can also click the Cancel button if you choose not to upload the data file.
    Upload Data File
    Upload Data File
Back to top