0

I have issue with debug sampler not showing regular expression extractor in Jmeter. Kindly refer the tree below:

Debug sampler 1

Here is the information in my regular expression extractor:

debug sampler info

There's no regular expression variables shown in debug sampler output: reg expr var

parameter reg expr

Can help to see what's the real issue here? FYI I'm scripting using webtours demo website & havent parameterize username and password yet coz i want to make sure my correlation works first. Thanks.

emeraldgold07
  • 173
  • 3
  • 14

1 Answers1

0
  1. Without seeing the response it's hard to say what is wrong, most probably your Regular Expression Extractor fails somewhere somehow, as per documentation:

    Template The template used to create a string from the matches found. This is an arbitrary string with special elements to refer to groups within the regular expression. The syntax to refer to a group is: '$1$' to refer to group 1, '$2$' to refer to group 2, etc. $0$ refers to whatever the entire expression matches.

    so for sure you need to change $1 to $1$

  2. Using regular expressions for parsing HTML is not the best idea, I would recommend consider using CSS Selector Extractor instead, the relevant configuration would be something like

    enter image description here

  3. I don't think your PostProcessor placement is correct, it's a Post processor so according to the JMeter test elements execution order it is executed after the sampler and you're trying to use the variable in the same request. So my expectation is that you need to move it under the "Homepage" sampler

  4. Add HTTP Cookie Manager to your Test Plan

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • 1. Already change to $1$, still no changes 2. I tried to use CSS Selector Extractor and display the result in Debug Sampler output, however no changes 3. Yes I already move it under Homepage sampler 4. Already add HTTP Cookie Manager - this was added automatically when I'm recording with Blazemeter plugins. Is there any additional configuration need to be done then? – emeraldgold07 May 19 '21 at 09:22
  • Sorry I accidentally pressed enter just now, kindly read the edited comments above – emeraldgold07 May 19 '21 at 09:25
  • Any thoughts on the first comment? – emeraldgold07 May 20 '21 at 09:01
  • Any thoughts on 1st point? Without seeing the response where this `userSession` is present we cannot help you efficiently – Dmitri T May 20 '21 at 09:24