I am using JMeter to load test a Moodle server. However my Regular Expression Extractor seems to lose the session key value.

Here is the Regular Expression Extractor I am using: enter image description here

However, after sending roughly 15 HTTP requests, the variable reverts to its empty value. I have tried disabling the last call that successfully uses this variable, and the two following calls. But with no change.

I also tried creating a second instance of this extractor right before this variable goes null, and it still fails to work.

I am new to JMeter, so any additional information I should look up would be greatly appreciated.

  • Where did you place regular expression extractor in your test plan? – Rohit Jul 7 at 6:24
  • Please post the complete hierarchy you've implemented in the Test Plan. – Rohan Kalia Jul 9 at 6:20

JMeter PostProcessors are obeying Scoping Rules, to wit:

  1. If you put the Regular Expression Extractor as a child of the Sampler - it will be applied to that sampler only

    • Sampler 1
      • Regular Expression Extractor (applies to Sampler 1 only)
    • Sampler 2
  2. If you put the Regular Expression Extractor at the same level as the Samplers - it will be applied to all the samplers.

    • Sampler 1
    • Regular Expression Extractor (applies to Sampler 1 and Sampler 2)
    • Sampler 2

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.