when i put p=2000:24\:([^:]+) into the reg exp extractor the session id is part of the response data/response body for the debugger. Does this mean it's successfully extracting the session id? Below is the http request. Is this where I put the variable to point to the reg exp extractor?
On Wed, Aug 11, 2021 at 7:22 PM Owen Pahl <[email protected]> wrote: > Is the session ID in the Request header or the Response header? > You can try adding more of the surrounding context to minimise matching > content that is not the target value. eg. "p=2000:24\:([^:]+)", assuming > the "2000:24" prefix is constant. > > To use the captured value, you would insert a variable reference in the > desired location, "${sess}" in this case. > JMeter will expand this reference with the value contained in the variable. > > > Cheers, > Owen > > On Thu, 12 Aug 2021 at 14:03, Troy Conner <[email protected]> wrote: > >> so i entered the below and now it's returning a lot of data, none of >> which seem to be the session id. Yes, the session id is in the header. what >> do i put in the other requests to have them use that extracted info? >> >> 24\:([^:]+) and now it's returning a lot. >> >> On Wed, Aug 11, 2021 at 6:28 PM Owen Pahl <[email protected]> wrote: >> >>> You are missing a quantifier on the regex so it only matches the first >>> digit but that is not followed by a colon so the entire match fails >>> (although you appear to have one in the screen shot in your first email). >>> Try this regex "24\:([^:]+)". I find https://regex101.com to be very >>> useful in debugging/optimising regex's. >>> >>> Also in the screen shot you have the extractor set to get the value from >>> the request headers. Is that correct? >>> >>> >>> Cheers, >>> Owen >>> >>> On Thu, 12 Aug 2021 at 13:16, Troy Conner <[email protected]> wrote: >>> >>>> When I add debug sampler after the Reg Exp extractor it doesn't return >>>> any values. Below is the header. I've highlighted the session id in red, >>>> which I added to the Reg exp extractor as 24:(.?): Shouldn't this work? >>>> >>>> Connection: keep-alive >>>> Referer: https://xxx.edu/pls/regis/f?p=2000:24:8764289093190::::: >>>> Accept-Language: en-US,en;q=0.5 >>>> DNT: 1 >>>> Accept-Encoding: gzip, deflate, br >>>> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 >>>> Firefox/78.0 >>>> Accept: text/css,*/*;q=0.1 >>>> Host: xxx.edu >>>> >>>> On Wed, Aug 11, 2021 at 5:35 PM Owen Pahl <[email protected]> wrote: >>>> >>>>> Hi Troy, >>>>> >>>>> Are you using the captured value in the 2nd request? >>>>> Have you confirmed the value is being captured correctly? >>>>> >>>>> Adding a Debug Sampler to your test after the 1st request will let you >>>>> see what value is being captured. >>>>> >>>>> Then you'll need to add the value to your second request, the >>>>> specifics will depend on the nature of your request but in general will >>>>> either be added as a header via the Header Manager or a GET/POST parameter >>>>> on the sampler directly. >>>>> This section of the user manual may help >>>>> https://jmeter.apache.org/usermanual/functions.html >>>>> >>>>> >>>>> Cheers, >>>>> Owen >>>>> >>>>> On Thu, 12 Aug 2021 at 11:09, Troy Conner <[email protected]> >>>>> wrote: >>>>> >>>>>> i'm trying to connect from one site to another. The 2nd site assigns >>>>>> a session id to the header, however it's responding with with "session >>>>>> expired". I've added a reg exp extractor under the http request that >>>>>> looks >>>>>> like this. The session id comes after 2000, but it doesn't work. How do i >>>>>> get and supply my session id to all http requests in my script? >>>>>> >>>>>> [image: image.png] >>>>>> >>>>>
