Reputation: 344
I am testing a site using JMeter
. I am creating a GET
request for getting an account number by an unique id. Which returns only the account number(in String). How can I get the account number in to a Reference Name
of JMeter extractor
?
Upvotes: 1
Views: 2060
Reputation: 15400
As you say the response has only the Account Number you are looking for,
Use a Beanshell post processor,
vars.put("ACCOUNTNUMBER", prev.getResponseDataAsString());
Then you can use ${ACCOUNTNUMBER} , in your test to get the value.
Upvotes: 0
Reputation: 672
Use Regular Expression Extractor.
Add Regular expression extractor
(under Post Processors) as a child of your request. Provide Reference Name
of your choice. Provide Regular expression
as (.+?)
.
Upvotes: 1