当前位置:网站首页>How to use [jmeter regular expression extractor] to solve the problem of returning the value as a parameter
How to use [jmeter regular expression extractor] to solve the problem of returning the value as a parameter
2022-08-10 08:33:00 【software testing】
Table of Contents
Add regular expression extractor step:
Foreword
When we use jmeter for interface testing, we often encounter that the return value of the previous interface will be used as the parameter of the next interface to request.At this time, you need to use jmeter's regular expression extractor.
Add regular expressionExtractor steps:
"Right click on the interface to add the extractor"——add——post processors——regular expression extractor, the specific operation is as follows:
After adding, the configuration is as follows:
Then the next interface call:
Description:
(1) Reference name: The name of the parameter to be referenced in the next request, such as filling in cid, you can use ${cid} to reference it.
(2) Regular expression:
(): The enclosed part is to be extracted.
.: Matches any string.
+: One or more times.
?: Don't be too greedy, stop after the first match is found.
(3) Template: refer to it with $$. If there are multiple regular expressions in the regular expression, it can be $2$$3$, etc., which means the parsed value is given to the title.For example: $1$ represents the first value parsed
(4) Matching numbers: 0 means random value, 1 means all values, usually fill in 0
(5) Default value: If the parameter does not get a value, it will default to a value and let it take it.
One last tip:
Results can be viewed in the result tree and the Debug PostProcessor during debugging to help analyze the results.
Conclusion
This post ends here. Finally, I hope that friends who read this post can gain something.If you want to take testing as a long-term career development goal, you need to keep learning and make yourself competitive. No matter how many years you work now, as long as you take action, you will already have an advantage.I wish everyone a promotion and salary increase in 2022. Those who have not joined the company will get the offer of their favorite company as soon as possible, and everything will go smoothly.
Welcome to leave a message, or follow my column to communicate with me.
边栏推荐
猜你喜欢
【NeRF】原始论文解读
Unity—UGUI control
ARM Architecture 2: Processor Core and Assembly Instruction Set
How AliExpress sellers seize product search weight
ABAP Data Types 和XSD Type 映射关系以及XSD Type属性
js函数聚合的三种实现方式
UGUI—事件,iTween插件
iwemeta metaverse: Ali's first COO: how to build a sales force
Delphi实现的一个文件在线查询显示下载功能
推荐几个高质量的软件测试实战项目
随机推荐
Day36 LeetCode
2022-08-01 Advanced Network Engineering (23) Advanced VLAN Technology - VLAN Aggregation, MUX VLAN
Docker搭建Mysql一主一从
js reads excel time format conversion
1499. 满足不等式的最大值 堆/双端队列
明明加了唯一索引,为什么还是产生重复数据?
Is the write performance of raid5 faster than raid10?
DAY25:逻辑漏洞复现
【Unity入门计划】制作RubyAdventure03-使用碰撞体&触发器实现世界交互
[Learn Rust together | Advanced articles | RMQTT library] RMQTT message server - installation and cluster configuration
【Unity入门计划】2D游戏实现敌人来回移动控制脚本
ARM体系结构2:处理器内核和汇编指令集
硬件工程师90天学习资料及笔记汇总20220730
ARM结构体系3:ARM指令的寻址和异常中断处理
Rust learning: 6.4_ enumeration of composite types
[机缘参悟-65]:《兵者,诡道也》-7-三十六计解读-败战计
Pieces of TensorFlow 2.9 (1)
js读取excel时间格式转换
【 WeChat applet 】 read page navigation
CV+Deep Learning - network architecture Pytorch recurrence series - classification (3: MobileNet, ShuffleNet)