当前位置:网站首页>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


边栏推荐
- Flink checkPoint和SavePoint
- SQL Sever中的窗口函数row_number()rank()dense_rank()
- 2022年智能机器人与系统国际研讨会(ISoIRS 2022)
- [resource sharing] the 5th International Conference on civil, architectural and environmental engineering in 2022 (iccaee 2022)
- leetCode-498: 对角线遍历
- [energy reports] International Conference on energy and environmental engineering in 2022 (cfeee 2022)
- Machine learning - principal component analysis (PCA)
- SQL Server AVG函数取整问题
- Uniapp implementation forbids video drag fast forward
- pycharm快捷键大全
猜你喜欢
随机推荐
Hill sorting graphic explanation + code implementation
uniapp实现点击拨打电话功能
抓包工具charles實踐分享
静态链接库和动态链接库的区别
解决微信小程序rich-text富文本标签内部图片宽高自适应的方法
栈题目:函数的独占时间
【资源分享】2022年环境工程与生物技术国际会议(CoEEB 2022)
numpy.linspace()
如何在一个页面上使用多个KindEditor编辑器并将值传递到服务器端
顺丰科技智慧物流校园技术挑战赛(2022/06/19)【AK】
用扫描的方法分发书稿校样
SQL Sever中的窗口函数row_number()rank()dense_rank()
线程的六种状态
[IEEE publication] 2022 International Conference on industrial automation, robotics and Control Engineering (iarce 2022)
Learn to use the phpstripslush function to remove backslashes
【IEEE出版】2022年智能交通与未来出行国际会议(CSTFM 2022)
记录一下MySql update会锁定哪些范围的数据
The great charm of cookies
包装类型与基本类型的区别
3. addition, deletion, modification and query of employees








