0

I created a test plan with two requests. In the first request I receive a JSON response from which I select an auth token. In the second request I should reach a page with this token, but instead I get: Authorization: Bearer ${token}''

First response:

{"message":"Success","authentication_token":"UG5FzqsXNb9jnvG8dzbo","token_type":"Bearer","refresh_token":"","user_id":1,"first_name":"John","last_name":"Doe"}

Regular expression:

"authentication_token":"(.+?)"

The regular expression seems to be OK. I tested it with the View Results Tree. I still have Authorization: Bearer ${token}'' in the second request.

Josh G
  • 14,068
  • 7
  • 62
  • 74

1 Answers1

0

The simplest way to parse json - is to use JMeter Plugin JSON Path Extractor. Find good example here ('Parsing JSON' subtitle)

Anyway, RexExp and Xpath Extractor should work. How do you use it? Could you provide more details?

Jay
  • 1,389
  • 1
  • 10
  • 15