当前位置:网站首页>How to implement the association between interfaces in JMeter?
How to implement the association between interfaces in JMeter?
2022-06-10 14:21:00 【Field test record】
Hello, everyone , I'm Daejeon .
There are many ways to associate , Share two of them that are often used in the field : Regular expression extractors and json Extractor .
First we need to know , What does association mean ?
The two interfaces are related , The response data of the previous interface is passed into the request of the next interface as a parameter .
such as : After a payment interface request is completed , You want to use the query interface to query the specific information of this order , that , You need to transfer the order data generated in the payment interface to the request of the query interface , Only in this way can we find the specific information of this order . This process is called correlation .
that JMeter How to implement Association in ?
The tool adds a post processor to the request : Regular expression extractors and json Extractor , Add path as shown in the following figure .

About regular expression extractors :

Quote name : As the request name in the next interface , Define your own ;
Regular expressions : Focus on finding the left and right boundaries of the response data , You can define multiple regular expressions . The common forms are (.*?)(.+?);
remarks :「.*?」 If the condition is met, it will only match once 、「.+?」 It means that after matching, it will directly return
Template : In the multiple regular expressions defined in the previous step, extract the first one and use $ A few $;
Match the Numbers :-1 All match 、0 Random match 、1 The first matching value 、2 The second matching value , Usually filled in 1;
The default value : Default value when matching fails , Just define yourself .
About json Extractor :

Names of created variables: Quote name , Self defined ;
JSON Path expressions: Path expression , Generally speaking, it means how you can find the value you want to reference ;
Match No.(0 for Random): Match the Numbers ,-1 All 、0 Random 、1 Is the first 、2 It's the second one. ;
Default Values: The default value , Represents the default value of matching failure , Here you can define it as the error message in case of failure .
The above is what Daejeon shared today , If you find it useful, you can give Daejeon a compliment .
Recommended articles :
How to learn software testing ?
So busy every day , Whether to write test cases or not ?
Linux Installation and configuration of
2022.06.09, It's the first day of Datian day shift 124 / 365 God . Each article solves a specific problem , Official account , Backstage private message 「 e-book 」 Send you 1.5G Test data , Direct messages 「 Linux 」 Get a detailed explanation of the order for field consolidation .
边栏推荐
- Flutter drawer learning summary 6
- Generate a dataset of training vectors for doc2vec
- [Discrete Mathematical period Review Series] Second and first order Logic (precate Logic)
- 二叉树和图1
- SIGIR 2022 | 港大、武大提出KGCL:基于知识图谱对比学习的推荐系统
- IIC总线的主要特点/通信过程/读写过程
- Anaconda installs opencv (CV2) and uses it in the jupyter notebook
- 1
- 2022山东省安全员C证复训题库及在线模拟考试
- CG碰撞检测 Collision Testing
猜你喜欢

Gin blog summary 1

Simulated 100 questions and online simulated examination for safety production management personnel of hazardous chemical production units in 2022

Review summary of final examination of software architecture principles, methods and practices, Second Edition

2022山东省安全员C证复训题库及在线模拟考试

Flutter Wrap Button bottomNavigationBar学习总结4

KaTeX问题 —— csdn编辑时中打出等号对齐的样式

SIGIR 2022 | HKU and Wuhan University put forward kgcl: a recommendation system based on knowledge map comparative learning

【離散數學期複習系列】二、一階邏輯(謂詞邏輯)
![[Discrete Mathematical period Review Series] Second and first order Logic (precate Logic)](/img/f3/c7e61462a012ca1b88dca7b1ecdb25.png)
[Discrete Mathematical period Review Series] Second and first order Logic (precate Logic)

Shutter wrap button bottomnavigationbar learning summary 4
随机推荐
[advanced MySQL] optimize SQL by using the execution plan explain (2)
QT transfers the received JSON data (including Chinese) Unicode to utf8
Kotlin bubbling algorithm, Gaud map filters out the data whose distance between two points is less than 50, and does not repeat the display
C#多线程学习笔记四
[note] about the problem of insufficient compilation mapping memory in keil
Flutter Icon Stack LIsttitle...学习总结3
Yanrong looks at how to realize the optimal storage solution of data Lake in a hybrid cloud environment
Kotlin 冒泡算法 ,高德地图 过滤掉两点之间距离小于50的数据,不重复显示
.NET C#基础(7):接口 - 人如何和猫互动
QT将接收到的json数据(含中文)unicode转utf8
Docker部署一个Redis集群
C multithreading learning note 1
Beijing / Shanghai internal promotion | recruitment of full-time interns in the system and network group of Microsoft Research Asia
QT interface nested movement based on qscrollarea
碰撞检测 Unity实验代码
消息中间件的消费模式
erp odoo 权限管理5年系统设置经验小结 真经验分享
IIC总线的主要特点/通信过程/读写过程
Shutter wrap button bottomnavigationbar learning summary 4
UE5如何將屏幕坐標轉為世界坐標和世界方向