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:
Let’s have a look on some of the common Samplers:
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
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.- Enter Domain name / IP address of the web server. Do not include the “http://” prefix.
- Enter Path to resource.
2: FTP Request
FTP Request Sampler allows to send an FTP “retrieve/download file” or “upload file” request to an FTP server.- Domain name / IP address of FTP server.
- File name to retrieve
- Select if you want to download a file
- Select if you want to upload a file
- Credentials of FTP account User
3: JDBC Request
JDBC Request Sampler is useful for database testing. It sends JDBC request consist of SQL query to a database.- 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.
- Select an appropriate query type from dropdown
- Write your SQL query without semicolon (;)
- Enter values to update (comma-separated)
- 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.- Server settings to set Mail Server Name and Port
- Mail settings to send an email
- Authentication Settings
- Security settings
- Message settings to enter Subject, Message Body and attach any file
Comments
Post a Comment