Samplers in JMeter


In this tutorial, we will be studying about Samplers which are the different types of the requests sent to the server. We will specially refer to HTTP request sampler and check its properties and configurations.

Samplers

Samplers in JMeter are added as child of Thread Groups. These are used to send different types of request to server. Once, the sampler request is processed by the server, its response is returned to JMeter and the same can be viewed and analyzed in terms of different performance parameters like response time, Hits per second, throughput etc.
We can launch the Samplers in JMeter by following the path-

Right Click on Thread Group -> Hover over Add -> Hover Over Sampler -> Click on the required Sampler Samplers in JMeter

In our previuos tutorials, we learnt that JMeter is used for performance testing of different kinds of applications like HTTP/HTTPS, FTP servers, database servers etc. Testing these applications requires sending different types of requests to the server, for this we use different Samplers in JMeter.
Let's now see the different types of Sampler provided by JMeter. Some of the most widely used Sampler in JMeter are-

  • HTTP Request - Used to send HTTP/HTTPS requests to server. This is the most widely used sampler for testing Web based applications.
  • JDBC Request - Used to send SQL queries to a database server.
  • SOAP/XML-RPC Request - Used to send SOAP requests to a SOAP webservice.
  • Test Action - This is special type of Sampler, which doesn't send a request to the server instead it is used to introduce pauses in a test.
  • FTP Request - Used to send file put and get requests to an FTP server.

Apart from the above defined samplers, there are additional list of samplers provided by JMeter-

  • AJP/1.3 Sampler
  • Access Log Sampler
  • BSF Sampler
  • BeanShell Sampler
  • Debug Sampler
  • JMS Point-to-Point
  • JMS Publisher
  • JMS Subscriber
  • JSR223 Sampler
  • JUnit Request
  • Java Request
  • LDAP Extended Request
  • LDAP Request
  • Mail Reader Sampler
  • OS Process Sampler
  • SMTP Sampler
  • TCP Sampler
  • Test Sampler
  • WebService (SOAP) Request

As we can see, JMeter provides us numerous types of samplers which are used for scripting the performance tests of different types of applications. During the course of this tutorial series, we will see different types of sampler and their usage.


Reference

Apache JMeter User Manual