Are you sure your regular expression is correct? There are online regex validators such as regex101 that confirm whether or not the regex matches the page response.
If you are trying to capture the value from a Set-Cookie header, you will need to set "Field to check" = "Response Headers" (since the Set-Cookie is a response header, not in the page response). There's a Stack Overflow question that might be useful: https://stackoverflow.com/questions/42134328/how-to-extract-cookie-data-from-jmeter-request On Thu, Aug 9, 2018 at 12:28 AM krish na <[email protected]> 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
