1
votes

I am testing login flow on web site using jmeter scenario was captured by jmeter http proxy server

during scenario execution parameters specific to authentication (session id in GET requests and cookies) are taken from previously captured http-request.

How should i change test plan configuration to capture session id reсeived from server?

1
On first HTTP POST Request following HTTP Response header is provided Set-Cookie: JSESSIONID=DE778CD6797C9534AAC2C72DFE27CA21; Path=/; HttpOnly All of the following HTTP Requests contains this attribute as Cookie: COOKIE_SUPPORT=true; LOGIN=61756469746f7231; SCREEN_NAME=2f427a463939466d475972546139735752565a4633773d3d; LFR_SESSION_STATE_11092=1381495801424; GUEST_LANGUAGE_ID=en_US; JSESSIONID=DE778CD6797C9534AAC2C72DFE27CA21; ... How to extract this parameter and provide it in following REQUEST in JMeter queries?Olga Saveleva

1 Answers

4
votes

Cookies should work fine if you add a an HTTP cookie mananger. You need to use a regular expression to capture the authentication tokens if you want to pass them as a variable to the next request.

If this is an ASP.NET application here's a great tutorial: http://www.markschabacker.com/blog/2013/05/10/jmeter_with_webforms_authentication/

If not, here a video on youtube that also covers the general scenario of extracting parameters to use for future requests: http://www.youtube.com/watch?v=SVxB3Tk4O4A