Samplers

Samplers allow JMeter to send specific types of requests to a server. In our sample tests later, we will be sending HTTP Requests the most, so we will
use HTTP Request Sampler to let JMeter send those requests. You may add Configuration Elements to these Samplers to customize your server requests.

Samplers allow you to define the requests that can be sent to a server. They simulate a user's request for a page from the target server. Each Sampler generates sample results that may have various attributes, such as performance, elapsed time, throughput, etc. By default, JMeter sends the requests in the order that the Samplers appear in the Test Plan tree. However, the order of processing the Samplers can be further customized using Logic Controllers. This will be further explained in the following section on "Logic Controllers".


You can customize each sampler by setting its properties, or you can add Configuration Elements. For the purpose of this book, since we will be sending numerous HTTP Requests to the same server, we may use the Default Configuration Element, which predefines the server to which all HTTP requests will be made.

An HTTP Request Sampler Control Panel looks like the following figure:


The following is a list of all Samplers JMeter provides:
  • HTTP Request
  • FTP Request
  • JDBC Request
  • Java Request
  • SOAP/XML-RPC Request
  • WebService (SOAP) Request
  • LDAP Request
  • LDAP Extended Request
  • Access Log Sampler
  • BeanShell Sampler
  • BSF Sampler
  • TCP Sampler
  • JMS Publisher
  • JMS Subscriber
  • JMS Point-to-Point
  • JUnit Request
  • Mail Reader Sampler
  • Test Action