当前位置:网站首页>How to extract login cookies when JMeter performs interface testing
How to extract login cookies when JMeter performs interface testing
2022-07-02 00:39:00 【Two black】
use JMeter When carrying out interface test , It is often necessary to extract Cookie To carry out other business processes , If cookie/token It is in the response message of login request , Then it can be extracted directly through regular expressions , But if Cookie Not in the response message , How else can we extract it ?
Through analysis, we found that , The request header of the business interface contains Cookie value , You need to get it through the login interface Cookie Then it is passed to the request header of other interfaces .
Add HTTP Cookie Manger, You can see Cookie value .

To put Cookie Stored as a variable , First of all, we need to /bin Under the table of contents jmeter.properties Of documents “#CookieManager.save.cookies=false” It is amended as follows “CookieManager.save.cookies=true” And remove the notes “#”.

Add HTTP Cookie Manager , And add user-defined Cookie, Set the name here as aaa, The value is ${COOKIE_aaa}.

stay HTTP Request header manager , Here you need this Cookie Used where the value is ${COOKIE_aaa} Express , That is to say :

In subsequent requests , You can see that the request header contains the passed Cookie value .
Learning resource sharing
Finally, thank everyone who reads my article carefully , Watching the rise and attention of fans all the way , Reciprocity is always necessary , Although it's not very valuable , If you can use it, you can take it 
These materials , For those who want to advance 【 automated testing 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you ! Everything should be done as soon as possible , Especially in the technology industry , We must improve our technical skills . I hope that's helpful …….
Join my communication group below for free !
边栏推荐
- sso单点登录的实现。
- gradle
- 4. Object mapping Mapstercover
- JS -- image to base code, base to file object
- Qt5.12.9 migration tutorial based on Quanzhi H3
- [template] adaptive Simpson integral
- BPR (Bayesian personalized sorting)
- From 20s to 500ms, I used these three methods
- 如何提升数据质量
- Practical calculation of the whole process of operational amplifier hysteresis comparator
猜你喜欢

mysql之B tree 以及 B+tree

Source code of Qiwei automatic card issuing system

The new version of graphic network PDF will be released soon

如何提升数据质量
![[leetcode] number of maximum consecutive ones](/img/70/7f3d1c8e0ab2698d98220cca911209.png)
[leetcode] number of maximum consecutive ones

2022 safety officer-b certificate examination practice questions simulated examination platform operation

2022 high altitude installation, maintenance and removal of test question simulation test platform operation

使用多线程Callable查询oracle数据库
![[bottom pop-up selector] uniapp picker component - scroll selector popped up at the bottom](/img/d4/9d27b29080ce83004aa875a499de9b.png)
[bottom pop-up selector] uniapp picker component - scroll selector popped up at the bottom

Leetcode skimming: stack and queue 06 (top k high-frequency elements)
随机推荐
Database -- sqlserver details
Leetcode skimming: binary tree 03 (post order traversal of binary tree)
二叉搜索树的创建,查找,添加,删除操作
What does open loop and closed loop mean?
Vue force cleaning browser cache
Is it safe for qiniu college to open an account? How to open an account?
JS common library CDN recommendation
Leetcode 96 différents arbres de recherche binaires
【CTF】bjdctf_2020_babystack2
【会议资源】2022年第三届自动化科学与工程国际会议(JCASE 2022)
EMC circuit protection device for surge and impulse current protection
RFID makes the inventory of fixed assets faster and more accurate
Kuberntes cloud native combat high availability deployment architecture
Some understandings of graph convolution neural network r-gcn considering relations and some explanations of DGL official code
Otaku wallpaper Daquan wechat applet source code - with dynamic wallpaper to support a variety of traffic owners
Graduation season | Huawei experts teach the interview secret: how to get a high paying offer from a large factory?
Node——Egg 创建本地文件访问接口
工作中非常重要的测试策略,你大概没注意过吧
Jielizhi Bluetooth headset quality control and production skills [chapter]
Leetcode medium question sharing (5)