Closed gajjargaurav closed 9 years ago
Thanks @gajjargaurav! :star2: Perhaps the jar should be enabled by default, with the option to disable it on per-scenario basis?
@hassy could do that. However request by default doesn't set it. If we set up that as default we are making an assumption that users would want that most of the time. I don't see that to be the case.
@gajjargaurav Yes, perhaps, although if the server doesn't send any cookies, there would be no performance overhead - and if it does, then the user probably wants these cookies to be sent on subsequent requests. Either way, I think cookies
should be a global option (set in config.defaults
), and it should be possible to set it on individual scenarios. The implementation should also make sure that there's a different cookie jar for every running scenario, rather than a global request
one.
Yes, that sounds like a plan. Thanks
@hassy , I've done a quick fix for now if that is acceptable. I would like to extend that to actually pass in cookies to set to in the cookie jar.
@gajjargaurav It does not seem to work as described in the issue, i.e. cookie support should be enabled by default.
I added a basic test case in this commit: https://github.com/artilleryio/minigun-core/commit/e7ac291d0b8a4ebd09c228b3206f069fcadd19f0 - this makes sure that cookies are enabled by default - will you have a chance to rewrite the PR so that this test passes? If not, I'm happy to do it.
@hassy , I will look into it during the weekend and update the PR.
@gajjargaurav Awesome, thanks! :)
@hassy I did get it working locally for global request object, however I am having issues doing with a separate jar for each scenario
In a scenario where a user needs to log in (e.g. a POST request) and go to a home( e.g. a GET request), where the home page requires the cookie set during the log in process to load the page correctly. e.g.