Sometimes multiple files are required for the successful execution of a load test.
With BlazeMeter, we handle the distribution of all types of files to all engines in each test for you.
Uploading files to a test configuration
You can upload files while configuring your test by clicking the upload files section entitled: "Upload Your Jmeter Scripts, CSV and/or JAR files". You can also drag and drop files to this location.
Limitations on file names
- File names should include only alphanumeric characters, underscores or hyphens: [0-9],[aA-zZ],[_-].
- File names should always include an extension.
- File Names CANNOT include Spaces.
- A file name: “my_file_no_4.csv” – is good.
- A file name: “m$ file&” – is bad.
Limitations on file content
BlazeMeter cannot read files containing non-ASCII characters. Please make sure non-ASCII are removed before uploading and starting the test. Exceptions: ZIP files (but not the files they contain) and JAR files.
Limitations on file size
BlazeMeter has a file size limit of 30 MB per file that can be uploaded. You can upload multiple files of up to 30 MB in size to your test, as needed.
Impact on start time: all files are copied into place first
- All files are downloaded to each of the test engines each time a test starts.
- A test will not start until all of the files are downloaded.
- Avoid including large files that are not needed.
Do you use the same files across multiple tests? If so, you can upload those files to Shared Folders and "include" the needed folders in as many tests as you would like.
Included folders are downloaded to each of the engines in your test before your test starts. Folder contents are included in an "all or nothing" manner. You select which folders to include rather than individual files.
IMPORTANT: JDBC drivers are an exception to this rule. These must be uploaded directly to the test, as shared folders do not currently support driver uploads.
Defining the path to files in Shared Folders in your JMX
To point to a file from an included Shared Folder in your script, simply use the "folder/filename" style path: folder1/file11.csv (no leading slash). See example below.
With power, comes responsibility
This approach gives you great power: you can update a large number of tests instantly by updating the contents of a single Shared Folder. Always consider that any change you make will impact every test that includes that folder, not just the test you are currently configuring.
Creating Shared Folders and Uploading Files To Them
Consider an example with user data and scenario data files you want to use across many tests.
First we create the two Shared Folders and add the files to them:
- Click the "Include files from shared folder(s)" button in any Test Configuration screen:
- Enter a new folder name in the "Create a shared folder" area and click "Create":
- The new folder will be marked as "Included" and selected for you so it's contents (empty for now) will appear in the "Viewing Folder" area at the bottom of the dialog.
- Click the "Upload files" icon as shown above to upload the files to your folder.
- Repeat steps 2-4 for each additional folder.
- Click "Apply" to include the folders in the current test:
The included folders and their file contents will now appear in your configuration screen:
Including Shared Folders in Other Tests
Now we are ready to go to additional tests that need these files and include the folders there.
- Go to the Test Configuration screen for the next test.
- Click the "Include files from shared folders" dialog:
- Click "Include" next to the folder(s) needed. When you do, the label will change to "Included". In the screenshot below, we have included the scenario_data folder and are about to include the user_data folder:
Removing a Shared Folder From a Test
- Click the "Include files from shared folder(s)" button on the Test Configuration screen. The list of "Included Folders" appears near the top of the dialog.
- Click the word "Included" next to the folder you want to stop including. The folder name will be cleared from the "Included Folders" list.
- Click "Apply" to save your changes.
Deleting a Shared Folder (Impacts All Tests Including Folder)
CAUTION: This procedure deletes the folder and it's contents from all tests that include this folder.
- Click the "Include files from shared folder(s)" button on any Test Configuration screen. The list of "Included Folders" appears near the top of the dialog.
- Click the "trashcan" icon on the right side of the folder you wish to delete.
- Click "OK" in the confirmation dialog that appears.