Bug 64556 - Same form key for all iterations
Summary: Same form key for all iterations
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 5.3
Hardware: PC Mac OS X 10.1
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2020-06-24 08:29 UTC by Anand V
Modified: 2020-07-25 14:38 UTC (History)
2 users (show)

Jmeter screenshot (430.86 KB, image/png)
2020-06-24 08:36 UTC, Anand V
simple test plan for website (5.17 KB, application/xml)
2020-06-25 10:01 UTC, Felix Schumacher
Application cookie Screenshot (280.38 KB, image/png)
2020-06-25 12:03 UTC, Anand V

Note You need to log in before you can comment on or make changes to this bug.
Description Anand V 2020-06-24 08:29:39 UTC

Comment 1 Anand V 2020-06-24 08:35:19 UTC
A test plan with below fields
a Thread group
Cookie manager
HTTP request sampler
listener to see result
url: https://www.partylite.co.uk/jasmine-jade-3-wick-jar-candle.html

Same form key for all users even though cookie clear checkbox is checked
Comment 2 Anand V 2020-06-24 08:36:47 UTC
Created attachment 37328 [details]
Jmeter screenshot
Comment 3 Felix Schumacher 2020-06-24 13:59:13 UTC
I believe this question should be asked on the users mailing list, as it seems to be about the usage of JMeter.

To answer anything about your question, we probably need the most simple test plan that exhibits your problem.

Remember that JMeter is not a "Browser" and will not execute client side logic.
Comment 4 Anand V 2020-06-25 07:49:55 UTC
Felix Schumacher this is a simple problem.
Since I'm getting same response data in all iterations.
If you open this url https://www.partylite.co.uk/jasmine-jade-3-wick-jar-candle.html in jmeter it should return unique form_key values in each iteration.
Basically server related cookies are not cleared for each iteration.
Requesting for your best solution.
Comment 5 Felix Schumacher 2020-06-25 10:01:54 UTC
Created attachment 37329 [details]
simple test plan for website

Hi Anand,
I made a simple test plan (that I asked you to provide) for this. It seems to me, that:
 * the application is not sending cookies (therefore the cookie manager is useless for this example)
 * the application is behind a cache (look at the X-Cache, X-Served-By, X-Cache-Hits and Vary Header) that is caching the requests and 
 * as the Accept-Encoding and the (not-existant) cookie is the same, we get a cached response (after the first one)

So it looks like an application problem (not sending a cookie, wrong entry into the application, etc.) rather than a JMeter problem.
Comment 6 Felix Schumacher 2020-06-25 10:03:16 UTC
This looks like a user question, the discussion should be continued on the users mailing list.

Feel free to reopen the ticket, if you are sure, that this is a bug.
Comment 7 Anand V 2020-06-25 12:02:32 UTC
Hi Felix,

Application is sending cookie. You can see the cookie values in application tab of the browser.
I have added screenshot also.
Please check and confirm why the form_key value is showing same value for all users (thread/iteration).
Comment 8 Anand V 2020-06-25 12:03:17 UTC
Created attachment 37330 [details]
Application cookie Screenshot
Comment 9 Anand V 2020-06-25 12:04:50 UTC
In jmeter, if we use cookie manager and clear cookie after each iteration option is checked then the server related cookie data should be unique for all users.
But that is not happening
Comment 10 The ASF infrastructure team 2022-09-24 20:38:20 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5347