当前位置:网站首页>How to extract login cookies when JMeter performs interface testing
How to extract login cookies when JMeter performs interface testing
2022-07-06 06:16:00 【The elegance of testing】
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 .
Last : It can be in the official account : Sad spicy bar ! Get one by yourself 216 Page software testing engineer interview guide document information 【 Free of charge 】. And the corresponding video learning tutorial is free to share !, It includes basic knowledge 、Linux necessary 、Shell、 The principles of the Internet 、Mysql database 、 Special topic of bag capturing tools 、 Interface testing tool 、 Test advanced -Python Programming 、Web automated testing 、APP automated testing 、 Interface automation testing 、 Testing advanced continuous integration 、 Test architecture development test framework 、 Performance testing 、 Safety test, etc. .
I recommend one 【Python Automated test communication group :746506216】, We can discuss communication software testing together , Learn software testing together 、 Interview and other aspects of software testing , Help you advance quickly Python automated testing / Test Development , On the road to high pay .
Friends who like software testing , If my blog helps you 、 If you like my blog content , please “ give the thumbs-up ” “ Comment on ” “ Collection ” One Key triple connection !
边栏推荐
猜你喜欢
Detailed explanation of P problem, NP problem, NPC problem and NP hard problem
数据库-当前读与快照读
Redis 核心技术与实战之 基本架构:一个键值数据库包含什么?
Sqlmap tutorial (III) practical skills II
G - Supermarket
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Embedded point test of app
(中)苹果有开源,但又怎样呢?
The latest 2022 review of "graph classification research"
[postman] collections configuration running process
随机推荐
VINS-Mono: A Robust and Versatile Monocular Visual-Inertial State Estimator
Application du Groupe Li dans gtsam
[C language] string left rotation
【API接口工具】postman-界面使用介绍
B - The Suspects
Redis 核心技术与实战之 基本架构:一个键值数据库包含什么?
Leaflet map
Overview of three core areas of Mathematics: geometry
Thoughts on data security (Reprint)
CoordinatorLayout+NestedScrollView+RecyclerView 上拉底部显示不全
properties文件
A complete collection of necessary learning websites for office programmers
数学三大核心领域概述:几何
「 WEB测试工程师 」岗位一面总结
Buuctf-[gxyctf2019] no dolls (xiaoyute detailed explanation)
Accélération de la lecture vidéo de l'entreprise
Function of contenttype
Understanding of processes and threads
【Postman】Collections配置运行过程
LeetCode 739. 每日温度