Reputation: 6968
I have this set-up in Jmeter as follows
TestPlan
GetToken
HTTP Request
Regular Expression Extractor
ReferenceName : token
Regular Expression: "Token": "(.+?)"
Template : $1$
Match No. : 1
Default Value : NO_TOKEN_VALUE
Debug Sampler
View Results Tree
When I run my test, I can see the result in View Results Tree
. When I test my regex in RegExp Tester
, it returns:
Match count: 1
Match[1][0]="Token": "1234567890"
Match[1][1]=`1234567890
However, when I view the Debug Sampler
, I always get:
token=NO_TOKEN_VALUE
Does anybody know what might be causing this?
Upvotes: 0
Views: 371
Reputation: 1452
Make sure you have the correct settings for the fields in Regex Extractor config:
Apply To: Main Sample and Sub-samples
Response Field To Check: Body
Upvotes: 1