Lest talk about the ways to deal with Loadrunner correlations when the boundaries are not same always.
1. In case there are digits in the Boundaries and which may change every time:
Suppose you have the response data as follows, where VALUE is the string you want to capture, but issue is that the left boundary is changing every time. You get the left boundary as axb, where x ranges between 0 and 9, as follows:
a0b=VALUExyz
a1b=VALUExyz
a2b=VALUExyz
——–
——–
a9b=VALUExyz
You can capture the desired string by putting the following correlation function in place, using the /DIG text flag in combination with LB:
web_reg_save_param(“DynamicCapture”, “LB/DIG=a#b\=”, “RB=rb”, LAST);
The corresponding place, which you expect to be dynamically filled in with a digit, should be replaced by a pound sign ( # ).
2. In case there are letters for which case may change:
If letters are changing case, you can modify the function as below to include the /IC flag:
web_reg_save_param(“DynamicCapture”, “LB/IC/DIG=a#b\=”, “RB/IC=rb”, LAST);
so the left boundary will match to a1b and A1B as well.
3. In case of multiple digits:1. In case there are digits in the Boundaries and which may change every time:
Suppose you have the response data as follows, where VALUE is the string you want to capture, but issue is that the left boundary is changing every time. You get the left boundary as axb, where x ranges between 0 and 9, as follows:
a0b=VALUExyz
a1b=VALUExyz
a2b=VALUExyz
——–
——–
a9b=VALUExyz
You can capture the desired string by putting the following correlation function in place, using the /DIG text flag in combination with LB:
web_reg_save_param(“DynamicCapture”, “LB/DIG=a#b\=”, “RB=rb”, LAST);
The corresponding place, which you expect to be dynamically filled in with a digit, should be replaced by a pound sign ( # ).
2. In case there are letters for which case may change:
If letters are changing case, you can modify the function as below to include the /IC flag:
web_reg_save_param(“DynamicCapture”, “LB/IC/DIG=a#b\=”, “RB/IC=rb”, LAST);
so the left boundary will match to a1b and A1B as well.
if there are multiple digits, you have to put a pound sign (#) sing for each digit:
A0123b=”VALUE”xyz
web_reg_save_param(“DynamicCapture”, “LB/IC/DIG=a####b\=”, “RB/IC=rb”, LAST);
4.In caes if dynamic digits or letters in the boundaries:
If there is a case, where you expect a place to be filled in dynamically by a digit or a letter, then modify the function to use /ALNUM instead of /DIG text flag, and use caret sign(^) instead of # :
web_reg_save_param(“DynamicCapture”, “LB/ALNUM=a^b\=”, “RB/IC=rb”, LAST);
5.Options for ALNUM flag:
To deal with the case while, matching alphanumeric dynamic boundaries, there are three versions of /ALNUM flag as –
ALNUMIC to ignore case.
ALNUMLC to match only lower case.
ALNUMUC to match only upper case.
No comments:
Post a Comment