jmeter-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 61585] New: Regular Expression Extractor does not populate variables if not preceeded by a Sampler
Date Thu, 05 Oct 2017 12:04:47 GMT

            Bug ID: 61585
           Summary: Regular Expression Extractor does not populate
                    variables if not preceeded by a Sampler
           Product: JMeter
           Version: 3.3
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
  Target Milestone: ---

Created attachment 35395
JMeter project snippet

This is not a big deal, but it's a bit misleading so perhaps worth reporting.

Ref. attached image. The example here is with HTTP Sampler but I guess the
behavior is generic.

I have a user-defined variable containing a URL and, within a simple
controller, I extract some parts of its value into other variables ("server",
"port" etc and then use them to configure an HTTP Sampler. The regular
expressions are correct and to their job (see below).

The HTTP sampler fails because the variables defined by the RegExp Extractors
aren't replaced with the extracted values, and that is because they are
actually not placed in JMeterVariables at all in the first place (using a
DebugSampler right after the extractions, I can see that the variables aren't

Since JMeter can't find a value for them, they stay as literals in the
configuration - which obviously causes the sampler to fail.

However, if I duplicate the HTTP sampler, the duplicated sampler works fine. 

It seems that RegExp Extractor needs at least a sampler (any sampler, anywhere
in the sequence) in order to actually place the variable it defines in
JMeterVariables - and they will be visible only after the first sampler is

Since the RegExp Extractor is post processor, it makes sort of sense, but it
should pehaps fail in a bit more explicit manner? Or shouldn't fail at all? 

After all, by placing even a Debug Sampler before the Extractors, it works as
expect so it doesn't seem an explicit design decision, but more of a side

No big deal as I said, but maybe something simple to fix to make life easier
for test script developers. :)



You are receiving this mail because:
You are the assignee for the bug.
View raw message