If you are using Cookie Manager and your application is using cookies then
typically you shouldnt have to do anything else (like extracting the
session id from the header and setting it - this is only needed for some
advanced use cases ) - So first confirm that you really need to do what you
are doing.

This regex is incorrect
Set-Cookie\s*:\sCMS_JSESSIONID=([^;]) ==> You would extract only the first
character . This should be ([^;]*). .Ensure you have selected response
headers in the radio button and this post processor is the child of the
request that is setting the cookie. Also your response says
ASP.NET_SessionID but you are looking for something named CMS_JSESSIONID -
is this correct ?
Add a debug sampler so you can see what you got.


On Wed, Aug 8, 2018 at 7:28 AM, krish na <krishna_q...@yahoo.in.invalid>
wrote:

> Hi,
> My session id's are stored in login Page like below:  (After adding Cookie
> manager in Request Data will looks like below)
> Cookie Data:IsAlreadyLoaded=1; ASP.NET_SessionId=r0jd02mhmkmctduxzsazprfd
> I'm using Regular Expression Extractor but not sure how to define the
> pattern to capture the above scenario.
> i'm using like below:
> variable - COOKIE_CMS_JSESSIONIDreg expression - 
> Set-Cookie\s*:\sCMS_JSESSIONID=([^;])Template
> - $1Smatch no - 1default value - Not Found
> Also using JSR223 PostProcessor and the groovy script below:
> def author = vars.get("COOKIE_CMS_JSESSIONID")log.info ("Session id is
> ${COOKIE_CMS_JSESSIONID}")
> After running when i check the log viewer the output is:
> 2018-08-08 19:52:29,397 INFO o.a.j.e.StandardJMeterEngine: Running the
> test!2018-08-08 19:52:29,397 INFO o.a.j.s.SampleEvent: List of
> sample_variables: []2018-08-08 19:52:29,407 INFO o.a.j.g.u.JMeterMenuBar:
> setRunning(true, *local*)2018-08-08 19:52:29,417 INFO
> o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread
> Group2018-08-08 19:52:29,417 INFO o.a.j.e.StandardJMeterEngine: Starting 1
> threads for group Thread Group.2018-08-08 19:52:29,417 INFO
> o.a.j.e.StandardJMeterEngine: Thread will continue on error2018-08-08
> 19:52:29,417 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1
> threads=1 ramp-up=1 perThread=1000.0 delayedStart=false2018-08-08
> 19:52:29,417 INFO o.a.j.t.ThreadGroup: Started thread group number
> 12018-08-08 19:52:29,417 INFO o.a.j.e.StandardJMeterEngine: All thread
> groups have been started2018-08-08 19:52:29,417 INFO o.a.j.t.JMeterThread:
> Thread started: Thread Group 1-12018-08-08 19:52:31,154 INFO
> o.a.j.e.JSR223PostProcessor: Session id is Not Found2018-08-08 19:52:31,384
> INFO o.a.j.e.JSR223PostProcessor: Session id is Not Found2018-08-08
> 19:52:32,648 INFO o.a.j.e.JSR223PostProcessor: Session id is Not
> Found2018-08-08 19:52:34,891 INFO o.a.j.e.JSR223PostProcessor: Session id
> is Not Found2018-08-08 19:52:36,446 INFO o.a.j.e.JSR223PostProcessor:
> Session id is Not Found2018-08-08 19:52:36,680 INFO
> o.a.j.e.JSR223PostProcessor: Session id is Not Found2018-08-08 19:52:36,910
> INFO o.a.j.e.JSR223PostProcessor: Session id is Not Found2018-08-08
> 19:52:37,902 INFO o.a.j.e.JSR223PostProcessor: Session id is Not
> Found2018-08-08 19:52:38,818 INFO o.a.j.e.JSR223PostProcessor: Session id
> is Not Found2018-08-08 19:52:39,068 INFO o.a.j.e.JSR223PostProcessor:
> Session id is Not Found2018-08-08 19:52:39,752 INFO
> o.a.j.e.JSR223PostProcessor: Session id is Not Found2018-08-08 19:52:39,752
> INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-12018-08-08
> 19:52:39,752 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group
> 1-12018-08-08 19:52:39,752 INFO o.a.j.e.StandardJMeterEngine: Notifying
> test listeners of end of test2018-08-08 19:52:39,752 INFO
> o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)
>
> Kindly help me to over come the above issue.
>
>
> Regards,
> Krishna - +91-9884451279.
>
> CallSend SMSAdd to SkypeYou'll need Skype CreditFree via Skype

Reply via email to