1
votes

I'm having some issues getting the variables from a Regular Expression Extractor to show in the View Results Tree.

Reg Ex and Test Plan

The Regular Expression Extractor is a child of the HTTP Request. The Debug Sampler and the View Results Tree are at the same level as the HTTP Request. I am trying to extract the Authorization Token.

API response

As you can see, I get a 200 response from the server with the Token.

View Results Tree with no RegEx variables

But I'm not even seeing the RegEx variables in the Debug Sampler. I would expect to see them, even if the Extractor didn't pull anything from the response. Am I missing a node? Looking in the wrong place? Using the wrong elements?

I've burned half a day researching and trying different things, please help.

Thanks.

1

1 Answers

0
votes
  1. Your regular expression is not correct, you should be using something like (.*) as your one will not match anything if you don't provide right boundary which you don't have. You can attempt sticking to line break character but it might not work if your token comes last
  2. You're looking into wrong tab of the View Results Tree listener, JMeter Variables (including pre-defined ones) live under Response Data -> Response Body path

    enter image description here

    Check out How to Debug your Apache JMeter Script article to learn more about JMeter tests troubleshooting techniques.