How to authorise (with OAuth 2.0) in JMeter having

2019-05-21 07:40发布

问题:

I have recorded scripts for all test cases, and run all test cases due to the OAuth 2.0 it is failing all of the test cases.
Now I have to authenticate OAuth 2.0 in JMeter, I have following information:

client_id, response_mode, protectedtokena, response_type, resources, scope, nonce,redirect_uri,wsucxt, cobrandid, client-request-id.

回答1:

  1. Add (or parametrize) parameter Authorization in your HTTP Header Manager. Add Bearer ${AuthToken} value. You should parse that token from previouse request.

  2. Check this guide about How to parse auth token