1. Get the login interface of the interface document and enter the login page of the web page
2. Open the developer tools of the browser , press F12, and click the login button
3. Check the unique cookie value returned by the login interface after logging in. The cookie value is in the "data" of the response data
4. Add a "regular expression extractor" to the login request interface
5. Fill in the regular expression extractor
Completion Instructions:
1 Reference name: You need to decide on the name yourself. You need to use this reference name to obtain the cookie later. Here it is named "expression", which will be referenced later by "HTTP header manager"
2Regular expression: Extract the cookie value at login into data, ".*?" means to match any value
3 template: related settings for regular expression extraction, quoted with $$, the number 1 means to give the first value to the string data
4 matching numbers: 0 means random, -1 means all, and the remaining positive integers represent the content that will be matched in the extracted content
6. Add a reference to the CSV file
CSV data has account number and password, and every time an account is logged in, a cookie value will be generated
7. To view the list on the home page, you need to use the login cookie value
First add a "HTTP request" for the home page in the thread group, and add a "HTTT header manager" for the http request
Fill in the required fields in the http information header manager, refer to the regular expression number five
8. View the result tree after execution
The request header of "View Homepage" will refer to the cookie value of the "Login" interface response
Response 200, successfully quoted cookie value