当前位置:网站首页>JMeter associated login 302 type interface

JMeter associated login 302 type interface

2022-06-23 00:49:00 Easy 64

Preface

Many logins are responses 302, That is, in the requested Response Of heard Set up a cookie, Then redirect to another interface , We can't get directly from the response of the interface cookie. How do we get the login interface settings cookie Input parameters for the next interface ? Actually jmeter Provides a simple way HTTP Cookie To log in cookie Management of , But if one sampler needs to use more than one cookie when , It's not as convenient as extracting it by yourself .

Application scenarios

Login interface settings cookie, Get the login through the regular expression extractor cookie After the message , The user system information interface uses ;
 Insert picture description here

Login interface

 Insert picture description here

header Set up :
 Insert picture description here
Accept-Language zh-CN,zh;q=0.9
Cache-Control max-age=0
Connection keep-alive
Content-Type application/x-www-form-urlencoded

Regular expression is extraction :
 Insert picture description here
beanshell Validate extraction results :
 Insert picture description here

relation cookie

 Insert picture description here
Running results :
 Insert picture description here

原网站

版权声明
本文为[Easy 64]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221446331737.html