当前位置:网站首页>JMeter interface test tool foundation - sampler (II)
JMeter interface test tool foundation - sampler (II)
2022-06-24 10:28:00 【Test - Eight Precepts】
6) Use keep Alive:
When this option is selected ,JMeter And the target server Keep-Alive In a way that HTTP signal communication , Selected by default .
HTTP In request Keep-Alive Mode description :
If a browser has multiple requests for a domain name , There will be frequent connections and disconnections . therefore HTTP 1.0 In the Connection: keep-alive attribute , Used to establish long connections , That's what we're talking about Keep-Alive Pattern .
Keep-Alive Patterns are more efficient , Because it avoids the overhead of frequent connection establishment and release .
7) Yes POST Use multipart/form-data:
Use multipart/from-data or application/x-www-form-urlencoded Mode sending HTTP POST request , Not selected by default .
explain POST The encoding type of the request form submission :multipart/from-data or application/x-www-form-urlencoded It is used to control how to encode the form data before sending it to the server .
| enctype attribute | explain |
|---|---|
| application/x-www-form-urlencoded | Default encoding , key1=value1&key2=value2. |
| multipart/form-data | Normal form submission , And form file upload . |
| text/plain | Coding in plain text , It doesn't contain any controls or format characters , This method is not commonly used . |
8) Browser compatible header (Browser-compatible headers)
When you check multipart/form-data when , Check this box to cut off http In the request header Content-Type and Content-Transfer-Encoding, And just send Content-Disposition part .
Send the parameters with the request :
1) Parameters (Parameters):
Send... With parameters in the request URL ,JMeter Provides a simple way to parameterize . Users can URL All parameters in are set in this table , Each row in the table is a parameter value pair ( Corresponding RUL Medium name 1= value 1).
Coding is the best option , Because if the parameter value contains ASCII Control Chars perhaps Non-ASCII characters Or other symbols , If not checked, the sending will fail ( The code problem ), If checked, these special symbols will be coded automatically

2) Message body data (Body Data):
Data messages sent with requests , Multiple data formats can be supported here json、xml etc. .
for example :
Parameter format :name=zhangsan&age=15 In the form of .( Parameters are in plain text )
Parameter format :json form .( Need configuration http Header Manager , add to Context-Type = application/json)
Be careful :Parameters and Body Data You can only send parameters in one of these ways .
3) Upload files (Files Upload):
Send the file in the request . Usually HTTP File upload behavior can be simulated in this way , The parameter name is the parameter corresponding to the sending file ,MINE Type For resource media type .

(4) Advanced page options

According to the illustration above :
Client implementation (Client implementation):
Realization ( Implementation): send out http How to request . Options for Java and HttpClient4, The default is HttpClient4.
HttpClient4 yes Java How the toolkit implements the request , Is based on .net Kit customization , Efficient .
If you are uploading a file, you must choose , Otherwise, the request is sent successfully , In fact, the file was not uploaded successfully .Overtime ( millisecond )<Timeouts(milliseconds)>: timeout .
link (Connect): Connection timeout , The unit is millisecond ;
Respond to (Response): Response wait timeout , The unit is millisecond ;
from HTML File embedded resources (Embedded Resources from HTML Files):
from HTML The file gets all the contained resources (Retrieve All Embedded Resources):
When this option is selected ,JMeter In a HTTP Requesting and receiving a response HTML After file contents , Also on the HTML To analyze , And get the HTML All the resources contained in ( picture 、flash etc. ), Not selected by default .
If the user only wants to get specific resources in the page , It can be in the backURLs must matchThe text box , Fill in the specific resource expression to download , So only those that match the specified regular expression URL The pointing resource will be downloaded .Parallel download (Parallel downloads): Whether to use the self-defined resource pool , Check to set the size .Number (Number): Resource pool size , The default setting is 6.The url must match (URLs must match):URL Matching filter , Fill in this item and only the matching url Resources for .
for example : To gethttp://example.com/All resources under , Using regular expressionshttp://example.com/.*.
source address :
Used only for http Agreement and Implementation by HttpClient4 The situation of , This property is used to enable IP cheating , Will rewrite this http The default local IP Address .
be used for JMeter The host has multiple IP Address . The value can be the host name 、IP Address or network interface device , Such as “ey0” or “l0” or “wlan0”.
You can set multiple , prevent IP The address is pulled black by the server .
IP/ Host name (IP/Hostname): Use specific IP Address or ( Local ) Host name .equipment (Device): Select the first available address for the interface , The device can be IPv4 or IPv6.equipment IPV4: Select the name of the device IPv4 Address .equipment IPV6: Select the name of the device IPv6 Address .
proxy server :
I don't want to use the local address to send Http request , If you want to use a proxy server, fill in .
Server name or IP: The name of the proxy server or IP Address .Port number: The port number of the agent .user name: Use the user name of the agent .password: User password .
Save the response as MD5 Hash : Select the , Only the server-side response data is recorded at execution time MD5 value , Without recording the complete response data . When a very large amount of data needs to be tested , It is recommended that this option be selected , To reduce the cost of sampler recording response data .
Come here “HTTP request ” This sampler is over , The page and usage of each sampler are not used , It can't be explained one by one here , What kind of sampler will be used in the future (Samplers) I'll explain it alone .
a key : Supporting learning materials and video teaching
So here I have carefully prepared the detailed information of the above outline in The link below is as follows


边栏推荐
- Difference between package type and basic type
- 顺丰科技智慧物流校园技术挑战赛(2022/06/19)【AK】
- Flink cluster construction and enterprise level yarn cluster construction
- Leetcode-1089: replication zero
- 包装类型的缓存机制
- 正规方程、、、
- Cross domain overview, simple accumulation
- How to use multiple kindeditor editors on a page and pass values to the server
- 学习整理在php中使用KindEditor富文本编辑器
- [resource sharing] the 5th International Conference on civil, architectural and environmental engineering in 2022 (iccaee 2022)
猜你喜欢

How to customize sharing links in wechat for H5 web pages

The difference between the sleep () method and the wait () method of a thread

Leetcode-223: rectangular area

希尔排序图文详解+代码实现

Thread pool execution process

4.分类管理业务开发

leetCode-498: 对角线遍历

Role of message queuing

Hill sorting graphic explanation + code implementation

Distributed transaction principle and solution
随机推荐
A method to solve the self-adaptive width and height of the internal picture of rich text label in wechat applet
Sort out interface performance optimization skills and kill slow code
International Symposium on energy and environmental engineering in 2022 (coeee 2022)
Juul, the American e-cigarette giant, suffered a disaster, and all products were forced off the shelves
自定义kindeditor编辑器的工具栏,items即去除不必要的工具栏或者保留部分工具栏
tf.contrib.layers.batch_norm
tf.errors
dedecms模板文件讲解以及首页标签替换
SQL Server AVG函数取整问题
Machine learning perceptron and k-nearest neighbor
numpy.linspace()
静态链接库和动态链接库的区别
[ei sharing] the 6th International Conference on ship, ocean and Maritime Engineering in 2022 (naome 2022)
2022全网最全最细的jmeter接口测试教程以及接口测试流程详解— JMeter测试计划元件(线程<用户>)
numpy.logical_and()
Flink集群搭建以及企业级yarn集群搭建
学习使用KindEditor富文本编辑器,点击上传图片遮罩太大或白屏解决方案
uniapp开发微信小程序,显示地图功能,且点击后打开高德或腾讯地图。
记录一下MySql update会锁定哪些范围的数据
Six states of threads