Answer the question
In order to leave comments, you need to log in
How to send a JMetr POST request to a URL, with data from a file(s)?
Good day everyone!
There is no experience in using JMeter, unfortunately.
There is a directory with text files, each line in which there is a POST request body. Each file contains requests from one client, i.e. file=client.
I ask for advice or information on solving the problem of automatically sending
data from files to a given URL using JMeter.
It's great if you manage to manage the parameters:
1. The number of simultaneously "working" clients (files)
2. The frequency of sending requests.
Thank you.
Answer the question
In order to leave comments, you need to log in
Good day.
About loading the request body from a file The HTTP Request
component has a special behavior for the File Path field: field , just for sending the full request body from a file:
Name of the file to send. If left blank, JMeter does not send a file, if filled in, JMeter automatically sends the request as a multipart form request.
If it is a POST or PUT or PATCH request and there is a single file whose 'Parameter name' attribute (below) is omitted, then the file is sent as the entire body of the request, ie no wrappers are added. This allows arbitrary bodies to be sent. This functionality is present for POST requests, and also for PUT requests. See below for some further information on parameter handling.
dir /B
or ls -l
orfind *
form a list of file names in the form of a file, let its name be files.csv
* Duration (seconds): 300Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question