user1866757
user1866757

Reputation: 39

Jmeter - have url that leads to a file, but don't want to download it

I have a server that I need to load test - I just need to see how long it takes to establish a connection to the server

To test this out I was given a url (something like: http://crl.test.hr/test.crl) that leads directly to a 5Mb file (test.crl)- so when I run my JMeter script, it not only establishes a connection to the server, but also downloads test.crl

that file is 5~Mb in size so it botches my response times (I dont have a download link so powerful to handle 360 5Mb file downloads in a minute)

I'm trying to avoid that but cant seem to find a way (using JMeter 3.1) for JMeter to only establish a connection to the server and then disconnect without downloading the file

Is it possible ?

Upvotes: 2

Views: 899

Answers (3)

Ori Marko
Ori Marko

Reputation: 58772

You also have an option to use HTTP Raw Request plugin.

It gives you an option to limit response buffer size by changing kg.apc.jmeter.samplers.ReceiveBufferSize property:

Request reads response using buffer with default length of 4KB. You may override this value by setting JMeter property kg.apc.jmeter.samplers.ReceiveBufferSize in bytes.

Just add plugin and add Sampler jp@gc - HTTP Raw Request.

Upvotes: 0

Ori Marko
Ori Marko

Reputation: 58772

You can use TCP Sampler it just sends the request and wait for any response:

The TCP Sampler opens a TCP/IP connection to the specified server. It then sends the text, and waits for a response.

For example GET request - Put just the Server Name/IP in Server Name or IP field and the full path with parameter put in Text to Send field

Upvotes: 1

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34536

You could workaround this by:

  • Setting a short response timeout on the HTTP Request
  • Adding a response assertion with "ignore status" checked and a text that check that response contains a ReadTimeout (not something else which would indicate an issue)

Another option is to use byte-range if your server handle it and make JMeter only download few bytes:

  • Add a Header manager and set :

Range: bytes=0-100

Another option is to use Head method instead of Get if your server handles it

Upvotes: 2

Related Questions