当前位置:网站首页>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 !
边栏推荐
- [wechat authorized login] the small program developed by uniapp realizes the function of obtaining wechat authorized login
- Is it safe for qiniu college to open an account? How to open an account?
- JS -- image to base code, base to file object
- Otaku wallpaper Daquan wechat applet source code - with dynamic wallpaper to support a variety of traffic owners
- Which app is better and more secure for stock mobile account opening
- Leetcode skimming: stack and queue 05 (inverse Polish expression evaluation)
- Friends circle community program source code sharing
- 启牛商学院给的证券账户安不安全?哪里可以开户
- Bc35 & bc95 onenet mqtt (old)
- LeetCode 0241.为运算表达式设计优先级 - DFS
猜你喜欢

EMC circuit protection device for surge and impulse current protection

GCC compilation

B tree and b+tree of MySQL

2022 safety officer-a certificate examination questions and online simulation examination

The origin of usb-if Association and various interfaces
![Jielizhi, production line assembly link [chapter]](/img/f8/20c41ffe9468d59bf25ea49f73751e.png)
Jielizhi, production line assembly link [chapter]

基于全志H3的QT5.12.9移植教程
![Jielizhi, production line assembly link [chapter]](/img/1d/d1736fad33c428e61f450aad512ce0.png)
Jielizhi, production line assembly link [chapter]

Schrodinger's Japanese learning applet source code

Upgraded wechat tool applet source code for mobile phone detection - supports a variety of main traffic modes
随机推荐
[wechat authorized login] the small program developed by uniapp realizes the function of obtaining wechat authorized login
Bc35 & bc95 onenet mqtt (old)
Which app is better and more secure for stock mobile account opening
An intern's journey to cnosdb
基于全志H3的QT5.12.9移植教程
SQL数据分析之子查询的综合用法和案例题【耐心整理】
PHP reads ini or env type configuration
The origin of usb-if Association and various interfaces
Using multithreaded callable to query Oracle Database
If the browser is accidentally closed, how does react cache the forms filled out by users?
excel查找与引用函数
Weather forecast applet source code weather wechat applet source code
Export default the exported object cannot be deconstructed, and module Differences between exports
Relevant settings of wechat applet cache expiration time (recommended)
[template] adaptive Simpson integral
2023款雷克萨斯ES产品公布,这回进步很有感
How to open an account for individual stock speculation? Is it safe?
Use es to realize epidemic map or take out order function (including code and data)
AIX存储管理之逻辑卷的创建及属性的查看和修改
2022 high altitude installation, maintenance and removal of test question simulation test platform operation