码迷,mamicode.com
首页 > 其他好文 > 详细

用jmeter走OAuth

时间:2015-11-19 13:12:29      阅读:917      评论:0      收藏:0      [点我收藏+]

标签:

本来还想问做服务端的同事拿个现成的,结果都是“不知道,我也没用过,测试那边用的多。。等等毫无营养的回答”

还是求国际友人吧,StackOverflow提问者下了一个plugin但是不会用 http://code.google.com/p/jmeter-oauth/

回答者:

Is your problem in JMeter OAuth Sampler usage - or in OAuth protocol testing strategy itself?

Whats wrong with JMeter OAuth Sampler guide on plugins site?

Beware only that sampler could not work or work not properly with Jmeter versions 2.5.x/2.6 - see related issue.
You can also use OAuth Test Client for additional verification.


UPDATED:
Again, use OAuth Test Client with any HTTP analyzer (HttpFox is good one) to study interaction using OAuth protocol - in this case with OAuth Test Server.

Here youll find description of all the steps of interaction that are easily mapped onto sampler on the picture in JMeter OAuth Sampler guide:

Getting a Request Token ("Authentication" sampler on the picture). Here you have to extract oauth_token and oauth_token_secret from successfull response to use further in OAuth Sampler:

oauth_token=requestkey&oauth_token_secret=requestsecret

Corresponding extractors are displayed as children of Authentication sampler.

Getting an Access Token ("Token Validation")
Get Data ("Get Data" OAuth Sampler on the picture).
Find protocol flow and specification here.

Here ${oauth_token} and ${token_secret} are extracted from the 1st samplers response.

于是我打算try一下,不行再catch。

用jmeter走OAuth

标签:

原文地址:http://www.cnblogs.com/haimingpro/p/4977194.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!