In this tutorial, we will be studying Samplers which are the different types of requests sent to the server. We will learn HTTP request sampler in detail and check its properties and configurations.
Samplers in JMeter are added as a child of Thread Groups. These are used to send different types of requests to the 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
In our previous tutorials, we learned 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 is-
- 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 web service.
- Test Action – This is a 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 an 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 that 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 the sampler and their usage.
That’s all we have in this section, please share it with your friends and colleagues. Check out the complete JMeter tutorial here.
Apache JMeter User Manual
Kuldeep is the founder and lead author of ArtOfTesting. He is skilled in test automation, performance testing, big data, and CI-CD. He brings his decade of experience to his current role where he is dedicated to educating the QA professionals. You can connect with him on LinkedIn.