Available in Extras Set

HTTP Raw Request since 0.4.1

Weak points of original HTTP Request

JMeter's original HTTP Request is quite convenient to use. But in advanced load testing you may notice several drawbacks:

  • indirect cookie and headers manipulation, though many Web applications rely on headers and cookies widely
  • if you know exact HTTP request that you want to feed to your server, you'll spend a lot of time setting it up in HTTP Request
  • TCP Sampler does not support measuring latency separately from response time
  • when you send or receive large files, you experience OutOfMemory issues
  • Your test uses a non standard method like "PURGE" (Varnish)

Advantages of Raw Request

  • really full control over request data
  • option to send file contents directly to network (lower memory usage on big files) (Some details...)
  • option to limit response data stored in results (lower memory consumption)
  • actually it is raw TCP sampler, so you can try to test non-HTTP servers

Using Raw Request

Together with obvious options like hostname and port you should know that:

  • all newlines (\r\n, \r and \n) in request data are converted to \r\n sequence to have correct HTTP request
  • you may not specify data to send, sampler will open connection and wait for data to receive
  • timeout works both for connection and data receiving, triggers when no packets received from server in timeout period
  • file contents sent without variables processing
  • response parsing, if enabled, is very simple for performance reasons, it treats first line as HTTP response line
  • "keep connection open" setting just keeps TCP connection open after request, each sampler has its own connection for now unlike original JMeter samplers
  • set JMeter property kg.apc.jmeter.samplers.ResultDataLimit to limit data stored in JMeter results. Response still read from network, but not fully stored in results.

Read Buffer Length

UDP 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.

Raw Data Source

If you using Raw Request in non-HTTP communication (which is possible), or just advanced HTTP requests with custom newlines, you may need to pass binary data in request. This is impossible directly from GUI, but you can specify such data with variables, and there's even special pre-processor to read variable from file: Raw Data Source. Attaching this pre-processor to your test plan gives you fast reading of any data into variable, which may be used in Raw Request.

Example

Download Test Plan

Hidden Feature :) and post on it