You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Shirish <sh...@gmail.com> on 2011/11/16 11:45:33 UTC

Reg: Multiple Regular Expression

Hello Friends,

I am having a scenario in my app where in I get to see a table with dynamic
data rows and from that table I need to select the desired rows randomly
with the help of check boxes against each rows. As for this particular
scenario I am not aware with the handling process in JMeter so I just
recorded the script by selecting the three rows randomly and in response
JMeter has recorded a HTTP request with a parameter as
"selectedIdList" with value as =>
"name_sort%3D*LEVEL_1_PART_100*%60org_name_sort%3D*VVISTEON*
%60id%3D58071%7Cname_sort%3D*LEVEL_1_SA_001*%60org_name_sort%3D*VISYTEON*%60
id%3D58074%7Cname_sort%3D*LEVEL_2_PART_001*%60org_name_sort%3D*VWSTEON*
%60id%3D58077%7Cname_sort%3D*LEVEL_2_PART_002*%60
org_name_sort%3D*VIXSTEON*%60id%3D58080%7Cname_sort%3D*LEVEL_2_PART_003*
%60org_name_sort%3D*VISQTEON*%60id%3D58083 "



As here in I have selected the 3 Rows so I wrote the Three different
Regular Expressions with details as

Reference Name:  selectmultipleSPNs1/2/3



Regular Expression:  supplierpart_number_sort"\:"(.+?)\"\,\"



Template:  $1$



Match No:  1/2/3



Default Value:  selectmultipleSPNs1/2/3 not Found


Now these three reg ex are returning me the desired values and I am
replacing the highlighted names with these regexp fetched from the previous
requests in the above mentioned request.But I need to know is there any
other better way to select dynamic records from table than what I am doing
here (if I want to select more than 3 rows then I need to write respective
regexp's)?

Your suggestions,advices can make a lot difference to my test scripts.

Thanks in advance,
Shirish