vendredi 26 octobre 2018

Jmeter unable to receive a new cookie

I encounter a problem that Jmeter couldn't get the latest cookie from the http request. There are 3 webs:

  • Main page: it responds the initial cookie
  • Login page: it requests with the initial cookie from 'Main page', and responds a new cookie
  • Search page: it requests with the new cookie from 'Login page', and responds with correct result

Now the problem is:

  • Main page: requests and responds well
  • Login page: requests with the initial cookie, get the right response body, but couldn't get the 'set-cookie' in the response header (detailed in the structure)
  • Search page: requests with the initial cookie, doesn't get the expected response

The structure is:

  • -Thread
  • --HTTP Request Defaults: Protocol=https, and input the server name
  • --HTTP Cookie Manager: 1. 'Login page' receives the 'set-cookie' in the response header while the Policy is rfc2965, but the 'Search page' request becomes 'no cookies'; 2. 'Login page' can't receives the 'set-cookie' in the response header while the Policy is not rfc2965 (all the others), 'Search page' requests with initial cookie
  • --HTTP Request for Home page
  • --HTTP Request for login page with HTTP Header Manager
  • --HTTP Request for search page with HTTP Header Manager
  • --View Results Tree

The jmeter version is 4.0.

How can I run the script for Search Page correctly?

Aucun commentaire:

Enregistrer un commentaire