Reputation: 568
My scenario Step1: I have set http request for my variable and values are
courseid = ${courseid}
priceid = ${priceid}
coursecategoryid = ${coursecategoryid}..
.....etc
Step2: I have set my regular expression extractor is
1) courseid
Reference name: Courseid
Regular expression: courseid=(.+?)&
Template: $0$
Mathch No: 0
2)Price id
Reference name: Priceid
Regular expression: priceid=(.+?)&
Template: $0$
Mathch No: 0
3)coursecategory id
Reference name: Coursecategoryid
Regular expression: coursecategoryid=(.+?)&
Template: $0$
Mathch No: 0
My result is showing below error in view result tree
http://192.168.2.41:8092/ecloudbaseweb//app/managecourseinfo?courseid=${courseid}&coursetitle=Maths&coursesubtitle=&coursedescription=Maths&coursegoal=Maths&coursepromevideopath=815%2Fpromovideo%2Ffile_19_Sep_2016_16_05_32_Promovideo.mp4&priceid=${priceid}&price=0&coursecategoryid=${coursecategoryid}
Kindly give me a solution for how can i using dynamic parameter for this scenario and kindly refer the snapshots
Upvotes: 0
Views: 16833
Reputation: 6398
I would recommend to follow these steps to find and fix the problem:
Note: Regular Expression Extractor should be added as a child of the sampler, in which response regular expressions should be applied.
Note: Reference names used in regular expression are case-sensitive.
Note: If a single group captures more than one value, then specify index which value to be used in the request. match 0 - random value, match n - value in 'n' index.
Eg: Suppose Regular expression: courseid=(.+?)& , captures more than one courseid from the response, then you need to specify the match to retrieve specific value. Check Debug Sample result to know the values captured using View Results Tree.
Edit:
As you are naming "Reference Name" as 'Courseid' but using it as '${courseid}', it won't match. Use '${Courseid}', i.e., upper case 'c'.
Reg Expr Extractor:
Usage:
Upvotes: 1