Vous êtes sur la page 1sur 8

Samplers

Home / JMeter

November 5, 2016 JMeter By Rida Sattar

JMeter Tutorial

JMeter SetUp

JMeter Basics

Build JMeter Test Plan

Elements of Test Plan

Samplers in JMeter allows JMeter to send different types of requests to a server. Samplers are the actual requests, JMeter sends to
the web server under test.

Each sampler (except Test Action) generates one or more sample results. The sample results have various attributes (success/fail,
elapsed time, data size etc.) and can be viewed in the various listeners. Some important Samplers available are as follows:

FTP Request
HTTP Request
Java Request
SMTP Sampler
BSF Sampler
JDBC Request
SOAP/XML RPC-Request

Complete list of available samplers can be seen in the following figure:


Let’s have a look on some of the common Samplers:

1: HTTP Request
HTTP Request Sampler is used to send HTTP/HTTPS requests to the web server.
1. Enter Domain name / IP address of the web server. Do not include the “http://” prefix.
2. Enter Path to resource.

Note: If you are going to send multiple requests to the same web server, consider using an HTTP Request Defaults Configuration
Element so you do not have to enter the same information for each HTTP Request. Or, instead of manually adding HTTP Requests,
you may want to use JMeter’s HTTP(S) Test Script Recorder to create them. This can save you time if you have a lot of HTTP
requests or requests with many parameters.

2: FTP Request
FTP Request Sampler allows to send an FTP “retrieve/download file” or “upload file” request to an FTP server.

1. Domain name / IP address of FTP server.


2. File name to retrieve
3. Select if you want to download a file
4. Select if you want to upload a file
5. Credentials of FTP account User
Note: If you are going to send multiple requests to the same FTP server, consider using a FTP Request Defaults Configuration
Element so you do not have to enter the same information for each FTP Request Generative Controller. When downloading a file, it
can be stored on disk (Local File) or in the Response Data, or both.

3: JDBC Request
JDBC Request Sampler is useful for database testing. It sends JDBC request consist of SQL query to a database.

1. Variable Name that the connection pool is bound to. The variable name should be same as of the ‘Variable Name’ defined in a
JDBC Connection Configuration.
2. Select an appropriate query type from dropdown
3. Write your SQL query without semicolon (;)
4. Enter values to update (comma-separated)
5. Enter columns data types (comma-separated)

4: SMTP Sampler
SMTP Sampler is used to test a Mail Server where it sends email messages by using SMTP/SMTPS protocol.
1. Server settings to set Mail Server Name and Port
2. Mail settings to send an email
3. Authentication Settings
4. Security settings
5. Message settings to enter Subject, Message Body and attach any file

For more updates on JMeter, please Subscribe to our Newsletter.



Please ask any questions on ForumsQA, in case of any issues or doubts.

JMeter

Share this post

About the author

Rida Sattar

My name is Rida Sattar. As a technical-savvy, I have more than 3 years of experience in Software testing and Selenium automation.
Currently I am working as a Senior QA Automation Engineer for an IT company in Karachi, Pakistan. I always love to put myself in new
challenges and break software from different angles. I have passion for automation and performance testing. I always try to share my
ideas and knowledge with the community because I believe in this quote: “Knowledge has no value unless you use and share it.”

Related posts
Test Plan Elements
September 24, 2018

Getting Familiar with JMeter GUI


July 19, 2018

How to Install JMeter?


July 4, 2018

How to Install Java on Mac OS?


July 4, 2018

Introduction to JMeter
June 21, 2018

Logic Controller
November 6, 2016

SUBSCRIBE TO NEWSLETTER

Enter your email address:

Subscribe

GOT SELENIUM PROBLEMS ?


RECENT POST

What is TestNG?

WebDriverManager

Test Plan Elements

Generate Newman Reports on Jenkins

Run Postman Collection on Jenkins

Getting Started with Cucumber BDD for Testing in Agile Teams

Using XPath Generator for test recording in Katalon Studio

Configure Jenkins Job to Run Batch Command

Postman with Newman & Jenkins

API Testing with Postman

Install Jenkins

SQL Table Commands

Newman Optional Parameters & Configurations

Trees

Queuing for Beginners

Got a Question?

Subscribe in a reader

Site Links

Selenium Training
Corporate Training
Video Tutorials
About Us
Guest Blogs
Testimonials
Contact Us
SITEMAP
Tutorials

Software Testing

Selenium - Java

Selenium - C#

Cucumber

SpecFlow

Appium

TestNg

JUnit

Maven

Java

Postman

Katalon

Author

I’M LAKSHAY SHARMA AND I’M A TEST AUTOMATION ENGINEER.

Have passed 11 years playing with automation in mammoth projects like O2 (UK), Sprint (US), TD Bank (CA), Canadian Tire
(CA), NHS (UK) & ASOS(UK).
Currently I am working with BLOOMREACH as SDET.

I am passionate about designing Automation Frameworks that are effective and easy to maintain. For automating websites my
weapons are QTP and Selenium (Webdriver). I live in Amsterdam(NL), with my wife and a lovely daughter.

Please connect with me at LinkedIn or follow me on Instagram.

© 2013-2018 TOOLSQA.COM | ALL RIGHTS RESERVED

Vous aimerez peut-être aussi