How can I pass dynamic value using regular expression in JMeter?



  • How can I pass dynamic value using regular expression in JMeter.

    enter image description here I need to pass the payment id from request to subsequent request.

    enter image description here


    Tried with that...But the default value only passing as shown in the image...enter image description here

    enter image description here.imgur.com/HMeXa.png



  • The primary way to pass the dynamic value in Performance Testing (using any tool) is through Correlation.

    Correlation is extracting value from one of the requests which can be used in the subsequent request or any of the request which must be executed further.

    Steps for correlating:

    (1) Create a Test Plan- Either Template or Manual

    (2) Add required listener, sampler, pre-processor, post-processor

    (3) There might be an HTTP request with dynamic value -> highlighted (session-id, etc.) enter image description here

    (4) Add regular expression extractor to the request with required boundaries. Every dynamic value requires a set of Regular expression.

    Ex: (.+?) . - is used for search (a-z) [0-9] + is used for repeatitive ? is used for -might or might not be under

    like below enter image description here

    These are the steps that will help you achieve Correlation in JMeter. Thanks for reading!!


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2