gopi
gopi

Reputation: 1

How to extract a token value which is available only in Inspect elements-> Application (Not in Inspect Elements-> Network) thru Jmeter?

How to extract a token value which is available only in Inspect elements-> Application (Not in Inspect Elements-> Network) thru Jmeter?

enter image description here

enter image description here

Upvotes: -1

Views: 1663

Answers (2)

Dmitri T
Dmitri T

Reputation: 168157

It comes as a Cookie so the easiest way to extract it is to:

  1. Add HTTP Cookie manager to your Test Plan

  2. Add the next line to user.properties file (lives in "bin" folder of your JMeter installation)

    CookieManager.save.cookies=true
    
  3. Restart JMeter to pick the change from point 2

  4. Once done you should be able to access the token as ${COOKIE_accesstoken} where required

More information:

Upvotes: 1

Janesh Kodikara
Janesh Kodikara

Reputation: 1841

The access token value is available in the response headers. You can use a post-processor element to extract the access token from the header.

Here is an example to extract the access token using a Regular Expression Extractor Post-processor

enter image description here

Upvotes: 1

Related Questions