1
votes

I'm scripting a simple login user script in Dyson website, below are the transactions:

01_LaunchHomePage 02_GoToYourDyson 03_Login 04_Logout

but when I replay it using JMeter, there's no cookie generated in homepage even I already inserted http cookie manager

below are the screenshots for homepage:

Recorded request in JMeter Replay request in JMeter

1

1 Answers

0
votes

It is absolutely expected for the first, initial request.

The cookies work like:

  1. When you send the first request the application responds with Set-Cookie header containing cookie name and value
  2. When you send the next request the browser is sending Cookie header and passes the cookie(s) received in the first request (if domain and path match and the cookie hasn't expired)

So if you look into 2nd and further requests you should see the appropriate cookies.

You can enable debug logging for the HTTP Cookie Manager in order to see what's going on under the hood and which cookies for which domain(s) and path(s) are being stored/passed

enter image description here

References: