I have 10 different __viewstate values in jmeter script. one is for login and others are for post methods. how can i use regular expression extractor to parameterize the viewstate for performance testing.
As per regular expression extractor documentation :
If the match number is set to a negative number, then all the possible matches in the sampler data are processed. The variables are set as follows:
- refName_matchNr - the number of matches found; could be 0
- refName_n, where n = 1,2,3 etc - the strings as generated by the template
- refName_n_gm, where m=0,1,2 - the groups for match n
- refName - always set to the default value
Set match number -1
for one expression to return all matches from the response.
As RaGe mentioned in the comment, you can just use 1 Regular Expression Extractor to find all the matches for the given pattern.
Regular Expression Extractor - Example
MatchNo :
When you enter -1 & get all matches, to access the first match, use TheVariableName_1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.