How can I pass dynamic value using regular expression in JMeter.
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
(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
These are the steps that will help you achieve Correlation in JMeter. Thanks for reading!!
You can use the Regular Expression Extractor.
You can simply select URL as Field to check and capture the end of the URL and place in a variable, which can be used afterwards.
- Change "Field to check" to
Change Regular Expression to be:
Other settings look fine