Difference between Boundary extractor and Regular Expression Extractor

1,030 views
Skip to first unread message

testid...@gmail.com

unread,
Feb 14, 2018, 2:38:00 AM2/14/18
to jmeter-plugins
Hi,

Could someone explain the difference in working of Boundary extractor and Regular Expression Extractor.
Also which one should be used at which particular situation.

Regards,
Neha

jmet...@gmail.com

unread,
Feb 15, 2018, 2:04:23 AM2/15/18
to jmeter-plugins
 Boundary extractor is a simple and compact version of Regular Expression Extractor:
"Allows the user to extract values from a server response using left and right boundaries"
You just give the boundaries and it just return the string between them

In Regular Expression Extractor you don't need boundaries, just give any regular expression and it will find it, even with several groups
"Allows the user to extract values from a server response using a Perl-type regular expression"

For example, Regular expression: This is (\w+) Regular (\w+) with (\w+) than 1 group
with Template: $1$-$2$-$3$
And for String: This is my Regular Expression with more than 1 group
It will return: my-Expression-more

PMD

unread,
Feb 15, 2018, 4:01:00 PM2/15/18
to jmeter-plugins
Hello,
Boundary extractor is a "stupid" extract that extract what is between Left and right boundary.

You don't need to know anything about regular expressions to use it.

So it is simple to use if it applies and performs better than all other extractors.


Regular Expression Extractor used Regex and as such is more powerful but maybe a bit more complex and performs less efficiently than Boundary.

Note that none of those components are plugins as they are in core jmeter.


Regards


@philmdot

Vincent Daburon

unread,
Feb 16, 2018, 9:01:10 AM2/16/18
to jmeter-plugins
Hi,
The boundary extractor is easyer to extract multi lines in a html page.

The regular extractor is more powerfull but it's not easy when you need informations in multi-lines.

You could combined a boundary extractor to extract lines and save it in a variable and in this variable extract more specific information with a regular extractor.

I use it to find a selected choice in choice liste the first boundary extractor
Example
extract Html page
                          <SELECT NAME="lcName">
<OPTION VALUE="0">TOUS</OPTION>
<OPTION VALUE="1211">nom1 prenom1</OPTION>
<OPTION VALUE="1329">nom119 prenom119</OPTION>
<OPTION VALUE="1222" SELECTED >nom12 prenom12</OPTION>
<OPTION VALUE="1330">nom120 prenom120</OPTION>
<OPTION VALUE="1308">nom98 prenom98</OPTION>
<OPTION VALUE="1309">nom99 prenom99</OPTION>
</SELECT>


1) boudary extractor
Left boundary : <SELECT NAME="lcName">
Rigth boudary :  </SELECT>
Variable will contains P_NAME_CHOICE_LISTE
<OPTION VALUE="0">TOUS</OPTION>
<OPTION VALUE="1211">nom1 prenom1</OPTION>
<OPTION VALUE="1329">nom119 prenom119</OPTION>
<OPTION VALUE="1222" SELECTED >nom12 prenom12</OPTION>
<OPTION VALUE="1330">nom120 prenom120</OPTION>
<OPTION VALUE="1308">nom98 prenom98</OPTION>
<OPTION VALUE="1309">nom99 prenom99</OPTION>
   
2) And a regular extractor for the selected value in the P_NAME_CHOICE_LISTE
name : P_NAME_ID
regular expression : <OPTION VALUE="([0-9]+)" SELECTED >

Result :  1222

Regards.
Vincent D.

gd.perform...@gmail.com

unread,
Aug 13, 2018, 1:42:56 AM8/13/18
to jmeter-plugins
Hi Neha,

A detailed description you can get at below link:


Thanks
Gagan
Reply all
Reply to author
Forward
0 new messages