Skip to content

Files Manager

The Files manager tool is available on the left menu of the Design view, in the Tools section.

It lets you upload and delete files. These files can be:

  • CSV variables content,
  • POST Http request bodies,
  • scripts,
  • hosts file to be be appended at the end of the load generator’s hosts file (during validation and runtime).
  • JMeter Plugins jar files,
  • bash script (using #!/usr/bin/env bash shebang) to run before the test is being executed. Runs on each load generator,
  • bash script (using #!/usr/bin/env bash shebang) to run after the test is being executed. Runs on each load generator.

Files Manager


All relevant files will be uploaded to the load generator under a resources/ folder. Except JAR files since they must be in lib/ext/ instead. If you have any static reference to a file in your script, make sure to update it using this relative path after import. For example: resources/myCSVfile.csv.

Upload a file

You can upload files simply by drag and dropping them in the Drop files here zone or by clicking on the Choose Files button.

Files are automatically added to the list, and a progress bar is displayed to inform you the the upload progress.


You can upload multiple files at the same time.

To replace a file content, simply upload the new file with the same name. The one already present in the files list is overwritten.

Delete a file

You can delete files simply by clicking on the Delete button in the list:


You can actually remove or replace a file that is used in a CSV variable or a POST request body. To make sure it does not break your virtual user execution you may run a validation before launching a real test.

Select a file

You can select or directly upload files from the CSV Variable panel or POST request bodies:

File Selector

Selecting an existing file is done using the select box. If you use many files in your project you can type the name of the file you are looking for to filter the displayed file.

Simply click on any filename to select it.

To upload a file click on the plus button located at the right of the selector. A Choose File button appears. Click on it and select a local file. It is automatically uploaded and selected.


If there are no files available in the current project, only the file upload option is visible. Filters may apply for the files you can select or upload. For example CSV variable only accept .csv and .txt files.

Script Examples

Removing JMeter files

The following script removes the old mongodb driver from JMeter lib/ folder:

#!/usr/bin/env bash
rm -f "${JMETER_HOME}/lib/mongo-java-driver-2.11.3.jar"

It can be convenient to use if some JAR files you need conflict with the existing JMeter JAR files.

Custom JKS

This script will be executed just before the test starts and right after all load generators are created. It is a good way to execute a configuration Like editing the file. Some properties must be in this file instead of the file that you can edit through runtime properties. In this example we configured JMeter to use a custom keystore so that our virtual users will send a specific client certificate:

#!/usr/bin/env bash


echo "${JMETER_HOME}/resources/myCert.jks"  >> ${SYSTEM_PROPS}
echo ""  >> ${SYSTEM_PROPS}
echo ""  >> ${SYSTEM_PROPS}

This way when JMeter starts it will take these settings into account.

Uploading a CSV to Test Logs

This script will be executed just before the test ends and all load generators are destroyed. It is a good way to execute a final action, or just save information stored on the load generators during the tests. For instance it can be used to save a CSV file created through a script to the OctoPerf report logs.

#!/usr/bin/env bash
mv file.csv ${HOST_NAME}.file.csv
uploadFile ${HOST_NAME}.file.csv

Here we use mv to add the load generator hostname to the file name. This way when we upload it to OctoPerf with uploadFile if there are several load generators, the file is not overwritten. It will then be available along with the JMeter logs in the report.


The script file will be run on a linux machine, thus it is important to use end of line chars in a linux fashion (no Carriage Return, only Line Feed). Otherwise you will end up with \r (Carriage Return) added to the commands you run, which can potentially make them fail.