JMeter to grab full querystring into a variable for future use
Posted
by jfbauer
on Stack Overflow
See other posts from Stack Overflow
or by jfbauer
Published on 2010-03-08T15:03:21Z
Indexed on
2010/03/08
15:06 UTC
Read the original article
Hit count: 731
Someone provided me the regex to parse out a query string: (?<=\?)[^?]+$
I am trying to use that in JMeter with no luck (although I am successful in pulling out individual query string parameter values based on various example postings on the web).
I created a regular expression extractor called "Grab QueryString". I selected the URL response field to check. For the reference name, I typed "myQueryString". For the regular expression, I entered your text. For template, I entered $1$ Match no = 1 Default Value = ERROR
Unfortunately, "myQueryString" is getting populated with ERROR and not the URL query string as hoped when I try and use it as a parameter in a future GET.
Thus, I see this in the "View Results Tree":
https:/www.website.com/folder/page.aspx?ERROR
Instead of:
https:/www.website.com/folder/page.aspx?jfhjHSDjgdjhsjhsdhjSJHWed
Did I do something wrong? Anyone have any suggestions?
© Stack Overflow or respective owner