本来还想问做服务端的同事拿个现成的,结果都是“不知道,我也没用过,测试那边用的多。。等等毫无营养的回答”
还是求国际友人吧,StackOverflow提问者下了一个plugin但是不会用 http://code.google.com/p/jmeter-oauth/
回答者:
Is your problem in JMeter OAuth Sampler usage - or in OAuth protocol testing strategy itself? What‘s wrong with JMeter OAuth Sampler guide on plugin‘s 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 you‘ll 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 sampler‘s response.
于是我打算try一下,不行再catch。
时间: 2024-10-27 13:30:53