How to send huge JSON with PDF encoded over HTTPS in JMeter?

25 Views Asked by At

I should to send a request HTTPS in JMeter and in the body I have to put an huge request with a Json.

I saw that if I put the json inside the body I can't open the request body in the View Result Tree and the Load Time is big for this request.

I tried to save the request in a .txt and I put it with the FileToString() JMeter function inside the body, but the Load Time is always high for this sampler.

Is there a solution to send a big request to the server without charge the content in the JMeter Memory?

1

There are 1 best solutions below

1
Ivan G On

For HTTP protocol you can use HTTP Raw Request sampler which has a nice feature of streaming the file to the backend without loading it into memory first.

You can take a look at the implementation and do the same for the HTTP Request sampler, in other words you will need to create a new JMeter plugin.

With regards to high "Load time" - JMeter measures the time from just before sending the request to the last byte of response to be transferred, I don't think that removing interim loading of the file into memory fill reduce response time, most probably the reason is somewhere else, however you can double check where JMeter spends the most of time using a profiler tool