Reputation: 3
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.
Upvotes: 0
Views: 579
Reputation: 23707
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.
Upvotes: 1
Reputation: 15390
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
Upvotes: 0