Om Prakash
Om Prakash

Reputation: 101

How to correlate dynamic boundary in jmeter

If we are having dynamic left and right boundary in response, then how to correlate them in Jmeter?

I found few useful article to correlate in Loadrunner, by using text flag in web_reg_save_param like "/DIG", "/BIN", "/ALNUM", "/IG". Or we can do that using web_reg_save_param_regexp.

Upvotes: 1

Views: 6019

Answers (2)

Dmitri T
Dmitri T

Reputation: 168072

JMeter doesn't operate "boundaries", the most popular Post Processor is Regular Expression Extractor which can handle both static or dynamic "boundaries" which you can set using Perl5-style regular expressions.

For example if you want to extract numeric value between foo and bar the relevant JMeter regular expression would be foo(\d+)bar

JMeter Regular Expression Number

If you are looking for a mix of numbers and letters you can use foo(\w+)bar

JMeter extract alphanumeric

The same approach you can follow if your response data is like foo1_A_VERY_INTERESTING_STRING_bar2 where 1 and 2 are dynamic:

JMeter Dynamic Variables

More information:

Upvotes: 1

Ori Marko
Ori Marko

Reputation: 58772

In Jmeter you use the relevant Regular expression in Regular Expression Extractor added as a post processor of the request.

for example for LoadRunner correlation:

Source: “GraphA123567EndGraphA”

Solution: web_reg_save_param_regexp(“ParamName=CorrValue”, “RegExp=\“Graph[A-Za-z]\”, \“([0-9]+)\”, \“EndGraph[A-Za-z]\””, LAST);

Result: 123567

You will use Regular Expression:

Graph([A-Za-z]+)(\d+)EndGraph([A-Za-z]+)

with Template: $2$ to get relevant group and in Jmeter ParamName is Reference Name

Upvotes: 1

Related Questions