I build up very simple test plan.

  1. Login: POST, a session cookie is returned.
  2. Get the state: GET, a user state is returned.
  3. Create a resource: POST, JSON body is supplied for the resource.

So my 'Test Plan' looks like:

  • Test Plan
    • Thread Group
      • HTTP Request Defaults
      • HTTP Cookie Manager
      • Login (HTTP Request Sampler: POST)
      • Get State (HTTP Request Sampler: GET)
      • Create Resource (HTTP Request Sampler: POST)

The cookie generated by 'Login' is added to 'Get State' correctly.
But 'Create Resource' has NO cookie. I changed their order but it doesn't help. I used the default options firstly and changed some options but it also doesn't help.

Is it a bug of JMeter? or just POST http request is not able to have cookie?
Please give me any advice.

[SOLVED]
I noticed that it is related to the path, not the method.
You'd like to look at the domain of the cookie as well as the path. I mean, the path and the domain of a cookie could be defined in the server side through Set-Cookie header.

Edit
Report