File Uploads: Different Files Per User¶
When a test case has a file upload, Load Tester automatically handles the upload during replays and load tests. However, in many tests each user should upload different file contents (and possibly use a different filename). Load Tester has streamlined this process to make it very easy to handle.
Step 1: Gather the Files to Upload¶
Collect all the files you want virtual users to upload during the load test. Store them in a folder on your local machine.
Example:
Step 2: Import Files into Load Tester¶
- Open Preferences: Window → Preferences
- Navigate to: Web Performance → File Upload
- Click: Add Files button
- Browse to the folder containing your upload files
- Select all files you want to import
- Click: Open
Load Tester copies the files into its own private area (so if you change the contents of the original files later, you'll need to re-import them for the changes to be recognized).
Step 3: Generate Dataset from Imported Files¶
After importing files, Load Tester can automatically generate a dataset mapping filenames to file paths:
- Still in File Upload Preferences, click Generate Dataset
- Enter dataset name: e.g.,
UploadFiles - Click: OK
Load Tester creates a dataset with two columns:
filename: The name of each file (e.g.,document1.pdf)filepath: The full path to the file in Load Tester's storage
Step 4: Find the File Field in the Test Case¶
- Open test case in Test Case Editor
- Open Fields View: Window → Show View → Fields View
- Select the transaction with the file upload (usually a POST request)
- Locate the file upload field in Fields View (field type will show as File)
Step 5: Configure Field to Use Dataset¶
- Double-click the file upload field to open Field Assignment dialog
- Datasource: Select Dataset from dropdown
- Choose dataset: Select the dataset you created (e.g.,
UploadFiles) - Choose field: Select the
filepathcolumn - Click: OK
The test case is now ready to run! Load Tester will automatically send the files to the load engine prior to starting the next load test.
Automatic File Distribution
Load Tester copies the uploaded files into its own private area and automatically distributes them to load engines before running load tests. You don't need to manually copy files to engine machines.
Re-Import After File Changes
If you modify the contents of the original upload files after importing them into Load Tester, you must re-import the files (repeat Step 2) for the changes to be recognized and sent to load engines.
Ask the AI to Configure File Uploads
If you're having trouble configuring file uploads:
I need to configure my test case so each virtual user uploads a different
PDF file. I have 50 PDF files in a folder. Can you walk me through the
steps to import them and configure the upload field?
The AI can:
- Guide you through the file import and dataset generation process
- Help locate the file upload field in Fields View
- Troubleshoot file upload configuration issues
- Explain how Load Tester distributes files to load engines
Best Practice: Use Datasets for File Uploads¶
Why: Realistic testing requires each virtual user to upload different content.
How: Import files → Generate dataset → Link file upload field to dataset's filepath column.
Troubleshooting¶
File Upload Fails: "File not found"¶
Symptom: Replay fails with error indicating file cannot be found.
Likely causes:
- Files not imported into Load Tester
- Field not linked to dataset properly
- Dataset column name wrong (should use
filepathcolumn, notfilename)
Solution:
- Verify files are imported: Window → Preferences → Web Performance → File Upload
- Check field configuration: Fields View → Double-click file upload field → Verify datasource is Dataset and column is filepath