user1358406
user1358406

Reputation: 1

Jmeter regular expression extractor for capturing dynamic value within code

Here I am using Jmeter 2.6 to test a .net application. While extracting dynamic value through regular expression Extractor, I am unable to proceed and getting the match count=0.

My expression is:

window.open('ConsumptionBatchSerial.aspx?Quantity='+ReturnQty+'&ItemCode='+ItemCode+'&Batch='+Batch+'&Serial='+Serial+'&StDetailsId='+StDetailsId+'','','width=810,height=350,left=100,top=150,resizable=1')

From this I want to extract Itemcode,Quantity,Serial,Batch,StDetailsId.

Can anybody have any idea on this concept? Please post if you are aware of such scenario.

Thanks in advance.

Upvotes: 0

Views: 768

Answers (2)

Subash Bose
Subash Bose

Reputation: 71

Regular Expression Formats to get the following values

1. Quantity
2. Itemcode
3. Batch
4. Serial
5. StDetailsId

Regular Expression

Quantity=(.+)&ItemCode=(.+)&Batch=(.+)&Serial=(.+)&StDetailsId=(.+)','',

Upvotes: 0

Lee Lowder
Lee Lowder

Reputation: 713

If you are wanting to capture the parsed data, which is what would show up in the browser, something like this should work.

(??)Quantity=([^&]*)&ItemCode=([^&]+)&Batch=([^&]+)&Serial=([^&]+)&StDetailsID=([^,]+)

If that string is the exact string you want to match, then something like this should work.

(??)Quantity='\+([^\+]*)\+&ItemCode='\+([^\+]*)\+&Batch='\+([^\+]*)\+&Serial='\+([^\+]*)\+&StDetailsID=\+([^\+]+)

(can't yet comment anywhere to ask for clarification, sorry)

Upvotes: 0

Related Questions