Data files

The topic describes the advantages of using data files and how to use them.

Using data files

You can upload data files and assign them to scripts so that the scripts can use their contents instead of having to input the data directly into the scripts. This is especially useful when multiple scripts use the same data (for example, paths, URLs, credentials, and so forth). When the data changes, you only update and reload the data files, instead of having to update multiple scripts manually.

Data files associated with a script will be deployed on load generator machines at runtime and extracted into the script's folder.

The folder structure inside the data file will be maintained, but existing files in script folder will be overwritten.

Data files are not exclusively for data or parameter files. You can also use them to share common items, such as header files, code, and TruClient function libraries.

Assume you have a common login implementation defined in “login.h” which is used by multiple scripts. You can create a .zip file to include the “login.h” (and its dependencies), and upload it as a data file to LoadRunner Cloud. Then, associate it with all scrips which need the implementation.

If you want to update the common login implementation, you simply create a new .zip file to include the updated implementation, then reload the data file in Assets > Data files as described below.

All scripts associated with the data file will automatically use the new implementation.

Back to top

Preparing data files

The following rules apply to data files:

  • Data files must be uploaded as a .zip file.
  • By default, each .zip file cannot exceed 50 MB.
  • For trial versions of LoadRunner Cloud, the total of all .zip files cannot exceed 200 MB.
  • The maximum number of data files that can be uploaded per tenant is 100 for trial versions and 5,000 for non-trial versions.
  • By default, the following file types are supported: dat, csv, txt, xml, json, cfg, pdf, doc, docx, xls, xlsx, h, c, java, jar, js, zip

Note: To change the default settings (file size and types), open a support ticket.

Back to top

Uploading and managing data files

Select Assets > Data Files.

Data files that have been uploaded are displayed in a list that includes the number of scripts to which a data file has been assigned. For a selected data file, additional information is shown on the right, including the files that comprise the .zip file and the scripts to which the data file has been assigned.

Action How to
Upload

Click Upload, select the file, and click Open.

Reload

Click Reload, select the file, and click Open.

Download

Select the data file in the list and click Download.

The file is saved in the default Downloads directory in the local file system.

Delete

Select the data file in the list and click Delete.

Deleting a data file removes it from any assigned scripts and also from the current project.

Back to top

Assigning data files to scripts

You assign a data file to a script in Assets > Scripts. For details, see Assign a data file.

Note: You can assign only one data file to a script.

Back to top