File upload tests need JMeter to send the same multipart form field that the application receives from a browser or API client. An HTTP Request sampler can attach a local file to a POST request while preserving the file field name, uploaded file name, and MIME type expected by the upload endpoint.
The file row belongs in the sampler's Files Upload area, while ordinary form fields stay under Parameters. Filling File Path makes JMeter send the request as multipart form data, and Parameter Name must match the server-side file field such as uploadFile rather than a local variable name.
Keep the first run small before raising thread count, file size, or test duration. Place fixture files where every JMeter engine can read them, use neutral sample files in shared .jmx plans, and verify the server receives the upload before using the sampler for size limits, virus-scan paths, or storage workflows.
quarterly upload smoke test
Relative file paths resolve from the saved test plan location during a CLI run. In distributed mode, place the same file at the same relative path on every JMeter server.
Protocol: https Server Name or IP: upload.example.net Port Number: 443 Method: POST Path: /upload
Use HTTP Request Defaults for shared protocol, host, and port values when several samplers hit the same application.
Related: How to configure HTTP Request Defaults in JMeter
When Browser-compatible headers is enabled, JMeter omits the multipart part's Content-Type and Content-Transfer-Encoding headers and sends only Content-Disposition for the part.
File Path: upload-sample.txt Parameter Name: uploadFile MIME Type: text/plain
Do not leave Parameter Name empty for a browser-style file field. A single file with no parameter name can be sent as the whole request body instead of as a named multipart part.
Name: description Value: smoke-test-upload
$ jmeter -n -t file-upload-request-create.jmx -l upload-results.jtl Creating summariser <summary> Created the tree successfully using file-upload-request-create.jmx Starting standalone test @ 2026 Jun 29 22:56:58 GMT Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445 summary = 1 in 00:00:00 = 12.5/s Avg: 18 Min: 18 Max: 18 Err: 0 (0.00%) Tidying up ... ... end of run
$ cat upload-results.jtl timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect 1782773818789,18,POST /upload file,200,OK,Upload user 1-1,text,true,,129,682,1,1,https://upload.example.net/upload,16,0,14
$ cat upload-api.log request method=POST path=/upload field=uploadFile filename=upload-sample.txt mime=text/plain bytes=28 status=200
The field name, file name, MIME type, and success status should match the sampler settings before the plan is reused with larger files or more threads.