1
votes

Trying to get some basic JMeter runs set up so I can test load performance, but been struggling to get the basics working with regards to Cookies. My app currently sets cookies without a domain which I know causes problems with JMeter. So I set CookieManager.check.cookies=false in the properties so it would skip validation, but that didn't work. The cookies are still not set by the Cookie Manager.

Other cookies are working (like the one added by my DNS provider which does set the domain) but the critical ones sent by my app I just can't seem to get working with the Cookie Manager in further requests.

Any ideas?

Other things to note:

  • I've set CookieManager.save.cookies=true
  • I've restarted JMeter so it loads the new properties
  • The same flow works perfectly in Postman

I'd appreciate any help to solve what I'm sure is a simple fix.

Mike

2

2 Answers

1
votes

Found the answer, so will post it here in case others come across this same problem.

It seems to be because of an inconsistency in the way you point to a web page, so I had to change this:

Bad URL

to this:

Good URL

To get it to work.

Odd, and unexpected, but it solved it. Hope this helps others.

0
votes

Always divide Path with Server Name or IP field,

Notice that sometimes server save cookie on specific path,

for example, when deploying multiple applications on same domain with different paths, so cookie is relevant only for specific path(s)

it's a valid option:

If you want the cookie to be valid in some other directory, say, http://example.com/special/, you will need to set the path variable to contain the value "/special". If you want the cookie to be valid everywhere on your site, set it to the root of your web directory, that is, "/".