如何配置Apache Jmeter 2.6 OAuth 2.0 [英] how to config apache jmeter 2.6 oauth 2.0

查看:316
本文介绍了如何配置Apache Jmeter 2.6 OAuth 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用jmeter对oauth 2.0安全API进行测试.我发现了以下插件

I need to perform tests using jmeter for an oauth 2.0 secured API. I have found the following plugin

http://code.google.com/p/jmeter-oauth/

我设法成功安装了它,但是现在我坚持实际编写测试.该文档丢失了....有人知道如何实际使用该插件吗?

I managed to successfully install it but now I am stuck with actually writing the tests. The documentation is missing....does anyone have a clue on how to actually use the plugin ?

谢谢.

推荐答案

您是JMeter OAuth采样器使用方面的问题还是OAuth协议测试策略本身的问题?

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

插件站点上的 JMeter OAuth采样器指南有什么问题?

What's wrong with JMeter OAuth Sampler guide on plugin's site?

仅当心采样器在Jmeter 2.5.x/2.6版本中无法正常工作或无法正常工作-请参见 OAuth测试客户端进行其他验证.

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.


更新:
同样,将 OAuth测试客户端与任何HTTP分析器一起使用(


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.

此处,您将找到易于映射的所有交互步骤的描述在《 JMeter OAuth采样器指南》中图片上的采样器上:

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:

  1. 获取请求令牌(图片中的身份验证"采样器). 在这里,您必须从中提取oauth_tokenoauth_token_secret 成功响应,可以在OAuth Sampler中进一步使用:

  1. 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

对应的提取器显示为Authentication的子代 采样器.

Corresponding extractors are displayed as children of Authentication sampler.

此处找到协议流程和规范

这里${oauth_token}${token_secret}是从第一个采样器的响应中提取的.

Here ${oauth_token} and ${token_secret} are extracted from the 1st sampler's response.

这篇关于如何配置Apache Jmeter 2.6 OAuth 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆