当前位置:网站首页>jmeter关联登录302类型的接口
jmeter关联登录302类型的接口
2022-06-22 14:46:00 【易爻64】
前言
很多的登录都是响应302,即在请求的Response的heard设置一个cookie,然后再重定向到另外一个接口,我们无法直接从接口的响应中直接获取cookie。我们如何获取登录接口设置的cookie用于下一个接口的入参呢? 其实jmeter提供了一种简便的方式HTTP Cookie来实现登录cookie的管理,但是如果一个取样器需要使用多个cookie时,不如自己提取来的方便。
应用场景
登录接口设置cookie,通过正则表达式提取器获取登录的cookie信息后,用户系统信息接口使用;
登录接口

header设置:
Accept-Language zh-CN,zh;q=0.9
Cache-Control max-age=0
Connection keep-alive
Content-Type application/x-www-form-urlencoded
正则表达是提取:
beanshell验证提取结果:
关联cookie

运行结果:
边栏推荐
- C语言学习-18-makefile文件编写例子以及如何生成、调用动态库
- [Huawei cloud to Jian Zhiyuan] the winning list of essay solicitation is released!
- Maze problem (BFS record path)
- Navicat premium connecting to Oracle database (Graphic tutorial)
- 打新债安全性有多高
- 华为机器学习服务银行卡识别功能,一键实现银行卡识别与绑定
- Scala语言学习-04-函数作为参数传入函数-函数作为返回值
- 【一起上水硕系列】Day Three - video
- 【山大会议】项目初始化
- Community article | mosn building subset optimization ideas sharing
猜你喜欢

Pymssql Module User Guide

Discourse 新用户可插入媒体的数量

Wallys/DR7915-wifi6-MT7915-MT7975-2T2R-support-OpenWRT-802.11AX-supporting-MiniPCIe

Simulation of vector

Promouvoir l'adaptation compatible et permettre le développement collaboratif du Service Express adaptatif gbase en mai

Bridging the gap between open source databases and database services

Cve-2022-0847 (privilege lifting kernel vulnerability)
New design of databend SQL planner

Research on ICT: domestic databases focus on the ICT market, and Huawei Gauss is expected to become the strongest

推進兼容適配,使能協同發展 GBase 5月適配速遞
随机推荐
HMS core news industry solution: let technology add humanistic temperature
着力打造网红产品,新捷途X70S焕新上市,8.79万起售
【山大会议】使用TypeScript为项目进行重构
84. (cesium chapter) movement of cesium model on terrain
模板特例化 template<>
js中const定义变量及for-of和for-in
Sdvo:ldso+ semantics, direct French Slam (RAL 2022)
[leetcode] 9. Palindromes
DevSecOps: CI/CD 流水线安全的最佳实践
New load balancing webclient CRUD
英国考虑基于国家安全因素让Arm在伦敦上市
Merge sort of sorting
On the routing tree of gin
“软件定义世界,开源共筑未来” 2022开放原子全球开源峰会7月底即将开启
Oracle客户端和服务端的区别
Mitsubishi manipulator demo program
vector的模拟实现
Scala语言学习-06-传名参数、传值参数、传函数参数的区别
大佬们好,初次使用MySQL cdc 报错
推荐几个AI智能平台