当前位置:网站首页>JMeter regular, XPath, JSON
JMeter regular, XPath, JSON
2022-07-21 17:32:00 【Kiraxqc】
One 、 Regular expressions
. : wildcard , Can identify any character , Represents a character
* : Represents the preceding character 0 Times or more
.* : Find the left boundary value and look for the right boundary right
for example :<title>.*</title>
?: Non greedy matching , Find the left boundary value and look for the right boundary right , Just find the matching right boundary , Stop looking ; Find the right boundary again 、 Left boundary .
for example :<title>?*<title>
1. Regular expression extractor
Thread group - add to - Post Processors - Regular expression extractor
Quote name : Save the variables of the extracted data
Regular expressions : for example <title>(.*)</title> The data content to be extracted from the response result ( Parentheses can be used to extract )
Templates : $1$ When there are multiple parentheses in the expression , You need to take the first few parentheses to save the variable
Match the Numbers :1 There are multiple values in parentheses, which one is taken ,1 It means the first one 1 individual ,-1 Express all
The default value : The value returned when no data is extracted
2. Case a
First visit www.163.com, Will return title Enter the value in Baidu to find
1) Add Netease request (HTTP request + Regular expression extractor )
2) Add Baidu request (HTTP request )
Be careful :? The separator is ,s It is equivalent to calling the search module ,/s?wd=" character "
3. Running results
Two 、xpath Extractor ( The response message is html)
xpath expression
/ Select from root node ( Take the child node ). // Select the node in the document from the current node that matches the selection , Regardless of their location ( Take the descendant node ). . Select the current node . .. Select the parent of the current node . @ Select Properties .
Thread group -HTTP request = Post Processors -xpath Extractor
1. Netease request (HTTP+xpath)
2. Baidu requests
3、 ... and 、JSON Extractor (JSON The response message )
JSON expression
. : Subelement
Thread group -HTTP request = Post Processors -JSON Extractor
1. Web request
2. Baidu requests
边栏推荐
猜你喜欢
SAP Fiori topic 2: using webide to build Fiori with navigation bar
华为无线设备配置基于ACL的报文过滤
Huawei wireless device configuration traffic supervision
Huawei wireless device configuration WMM and priority mapping
Regression prediction analysis of jujube genetics based on support vector machine
@RequestParam注解的正确使用方式
Codeforces Round #809 (Div. 2)
对等网主机的通信过程以及原理,很简单
MySQL multi line data synthesis one line function group_ CONCAT
ES基础知识和常用查询基础
随机推荐
Time series analysis of port berths during Arima epidemic
华为无线设备配置不同业务VLAN的AP间快速漫游
Starbucks CEO said that more stores may be closed to ensure the safety of employees
内存溢出和内存泄漏的区别
Configuring airtime scheduling for Huawei wireless devices
Simple factory mode (I) application in source code | calendar | source code analysis | use summary | builder mode
JS syntax variables (declaration, naming conventions, declaration of multiple variables at one time, use)
复杂链表的复制
C#(三十八)之StreamWriter StreamWriter使用方法及与FileStream类的区别
Analysis of tars source code 23
Huawei wireless device configuration WMM and priority mapping
ccs3-综合实验--样式表文件--设计一个菜单页面
JS -- basic grammar
Huawei wireless device configuration traffic supervision
1056 Mice and Rice
MySQL multi line data synthesis one line function group_ CONCAT
Huawei wireless device roaming configures non fast roaming between APs of the same service VLAN
Huawei wireless devices are configured with fast roaming between APs of the same service VLAN
cv demo
数据分析demo